binarycrusader / libproxy

Automatically exported from code.google.com/p/libproxy
GNU Lesser General Public License v2.1
0 stars 0 forks source link

px_free is pointless #84

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
/**
 * Frees memory and doesn't crash if that memory is NULL
 * @mem Memory to free or NULL
 */
void
px_free(void *mem)
{
        if (!mem) return;
        free(mem);
}

free(NULL) is safe. It does not crash. Really. Try it.

Original issue reported on code.google.com by vda.li...@googlemail.com on 23 Feb 2010 at 4:10

GoogleCodeExporter commented 9 years ago
px_free no longer exists in trunk, which uses C++'s delete.

Original comment by npmccallum@gmail.com on 23 Feb 2010 at 4:22