> Now, I'm not sure if getpwuid actually allocates memory. Some > documentation does not mention anything about it; some mention it is not > possible; some mention that getpwuid can result in an ENOMEM > (allocation failed) error, > which clearly indicates that getpwuid tries to allocate some memory. > Since I'm not sure I thought I should ask the experts.
Hi, reading in getpwuid man page (IEEE Std 1003.1-2008).... "The return value may point to a static area which is overwritten by a subsequent call to getpwent(), getpwnam(), or getpwuid()." I think that any real implementation of this function will use a static area, or otherwise will use a dynamically allocated one but managed by the library itself. So i belive no free is necessary (and anyways i can't put a free knowing that the returned pointer may be to a static area). Regards _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users