diff options
author | Florian Weimer <fweimer@redhat.com> | 2022-07-05 11:04:45 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2022-07-05 11:04:45 +0200 |
commit | ef0700004bf0dccf493a5e8e21f71d9e7972ea9f (patch) | |
tree | c96014f75b7bb4cda222d7ee6ed0fbd22d467c89 /stdlib/cxa_finalize.c | |
parent | 9d77023bf33ca5d0b07c318fe9fbe4347f0ae25a (diff) | |
download | glibc-ef0700004bf0dccf493a5e8e21f71d9e7972ea9f.tar.gz |
stdlib: Simplify buffer management in canonicalize
Move the buffer management from realpath_stk to __realpath. This
allows returning directly after allocation errors.
Always make a copy of the result buffer using strdup even if it is
already heap-allocated. (Heap-allocated buffers are somewhat rare.)
This avoids GCC warnings at certain optimization levels.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'stdlib/cxa_finalize.c')
0 files changed, 0 insertions, 0 deletions