svn commit: trunk/busybox/networking
Bernhard Fischer
rep.nop at aon.at
Thu Nov 16 16:44:33 UTC 2006
On Thu, Nov 16, 2006 at 08:20:13AM -0800, vda at busybox.net wrote:
>fix double-free bug
>symptom: glibc caught double-free (we didn't NULL config->xxx ptrs after free)
> # if ENABLE_FEATURE_HTTPD_CGI
> free(cookie);
> free(content_type);
>- free(config->referer);
>+ free(config->referer); config->referer = NULL;
> # if ENABLE_FEATURE_HTTPD_BASIC_AUTH
>- free(config->remoteuser);
>+ free(config->remoteuser); config->remoteuser = NULL;
> # endif
> # endif
> shutdown(config->accepted_socket, SHUT_WR);
Please add these to their own lines. Also, i /thought/ that we had an
xfree() that nullified the ptr after freeing it?
More information about the busybox
mailing list