1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-14 02:32:32 +03:00
Files
glibc/stdlib/canonicalize.c
Florian Weimer ef0700004b 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>
2022-07-05 11:04:45 +02:00

14 KiB