about summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2022-07-05 11:04:45 +0200
committerFlorian Weimer <fweimer@redhat.com>2022-07-05 11:04:45 +0200
commitef0700004bf0dccf493a5e8e21f71d9e7972ea9f (patch)
treec96014f75b7bb4cda222d7ee6ed0fbd22d467c89 /malloc
parent9d77023bf33ca5d0b07c318fe9fbe4347f0ae25a (diff)
downloadglibc-ef0700004bf0dccf493a5e8e21f71d9e7972ea9f.tar.gz
glibc-ef0700004bf0dccf493a5e8e21f71d9e7972ea9f.tar.xz
glibc-ef0700004bf0dccf493a5e8e21f71d9e7972ea9f.zip
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 'malloc')
0 files changed, 0 insertions, 0 deletions