Nmap Development mailing list archives
Re: [PATCH] migrate leftover malloc() calls to safe_malloc()
From: Kris Katterjohn <katterjohn () gmail com>
Date: Fri, 20 Jun 2008 18:35:40 -0500
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Brandon Enright wrote:
As part of a memory leak that I'm trying to track down I've migrated all the remaining malloc() calls to use safe_malloc().
I take it the memory leaks I fixed in NSE weren't the cause of your problem?
Because safe_malloc() does return-code checking I've removed the assert() and other checking in places where malloc() was still being used. Patch attached.
Good idea. It looks fine and compiles fine for me. I notice there are also two bare realloc()s in nbase/snprintf.c which can be changed as well.
Brandon
Thanks, Kris Katterjohn -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQIVAwUBSFw+yv9K37xXYl36AQKoQRAAsdIdnNPOFfpWHHb0sVTIB/W6MNJyV6mC 8WcNtNUCP0rx5VR8MGn9sIwv+iIo2eF0IgOxa8TWeCl3SG03l41+jV8GHmJENHc3 aWOuS2QBj5RbJPrpdV1md7x0Zv8KfaI+3DQMKbq/ggYK+X+44lEHWgn8A8lt289m QdJFJqJg1eMAixfB6w4pIxgsj5hvtRjTGS66p9oqe9ceuIJrlNMTXPmUg7c1OIKr w47ZE5XoZ3wOSaMy7jzxn1qGq0+r7A8kTGohvEHTFCk5GNDurSa6pfA8/J6cx95t HIdWP/FQ4xy9d1d/MtycGcND8IdkUdTCk1r+H3O0CK7jmiHj5aYzUbNbMncJf1xf gSuqnapspUH3ziF8lY1kYNCES5Isdjjs4kB0H6y0OX/bkfgPYcRixfSLabKb59Ol odW0j/l+JFbuyuHsBTK1ZKWLhsKt7TrIeYAEV9KyNl0PynLiw8rfQl771gZeTsyJ Z9AKnGNsI3cC03kfMA5HfUDV/zi2NLfzf1Mp9AgBaqmI/PpOoXV7rjsYRNN+f+XK nlUGy08VHMpfhj4kTYzGB0Q0+/Vkcm2JquRjLx04CNl1NiwzQKf3FGZAL1aSeniq yvgW/MR3sYXp0BkFVAGjb5qlzI75NHTUy9teF3CHj7ZMzO4aSJhYXMKr285cibwt p3vUMiLuwEY= =V0HO -----END PGP SIGNATURE----- _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [PATCH] migrate leftover malloc() calls to safe_malloc() Brandon Enright (Jun 20)
- Re: [PATCH] migrate leftover malloc() calls to safe_malloc() Kris Katterjohn (Jun 20)
- Re: [PATCH] migrate leftover malloc() calls to safe_malloc() Brandon Enright (Jun 20)
- Re: [PATCH] migrate leftover malloc() calls to safe_malloc() Fyodor (Jun 20)
- Re: [PATCH] migrate leftover malloc() calls to safe_malloc() Brandon Enright (Jun 20)
- Re: [PATCH] migrate leftover malloc() calls to safe_malloc() Kris Katterjohn (Jun 20)