Your task is that something should free resources (i.e. call free()).
free() (., , strdup), , free. , , foo_destroy. , struct, , , (, ).
. , , , , , . apache2 apr_pool. , free() . . ( ) .
, C ( malloc() d), , . , , .
, , char *:
(, strdup, get_current_dir_name getcwd ) , .
(, strerror_r getcwd ) , .
: getcwd man:
POSIX.1-2001, Linux (libc4, libc5, glibc) getcwd() malloc(3), buf - NULL. size, size , buf . free(3) .
, , / (yuck - ). . strerror strerror_r.
( ), .
(, libxml) free (xmlFree() )
(, apr_palloc) .