[Was] Resolving the licensing issues.
Bernd Petrovitsch
bernd at firmix.at
Thu Mar 2 14:08:06 PST 2006
On Thu, 2006-03-02 at 21:46 +0100, Tito wrote:
[...]
> Why not:
>
> void *xfree(void *ptr)
> {
> /* sets the pointer to NULL after it has been freed. */
> free(ptr);
> return NULL;
> }
or
#define FREE(p) do { free(p); (p) = NULL; } while(0)
> to use as:
>
> ptr = xfree(ptr);
FREE(ptr);
> so all double free errors should be avoided.
And especially "use after free" is detected.
Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services
More information about the busybox
mailing list