diff options
author | SUZUKI, Shinsuke <suz@kame.net> | 2008-05-01 03:32:29 +0000 |
---|---|---|
committer | Bjørn Mork <bjorn@mork.no> | 2010-08-06 15:37:37 +0200 |
commit | b185b22b5c90245fc4a2e06dae7b5da70e3f964a (patch) | |
tree | c16a95702bd2a2c298f00baa61a42f0a11a1ee86 | |
parent | 959d5858478218bc2da84c4cee4cf25727ae1ff6 (diff) |
fixed a possible memory leak. (Bug-ID 1847588)
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | config.c | 3 |
2 files changed, 4 insertions, 1 deletions
@@ -3,6 +3,8 @@ * dhcp6s.c: fixed a potential NULL pointer access (Bug-ID: 1848304). used a val_statefuladdr, instead of val_prefix, to access an address in IA in DHCP DECLINE handling. + * config.c: fixed a possible memory leak. (Bug-ID 1847588) + 2007-12-06 SUZUKI, Shinsuke <suz@kame.net> * common.c: fixed a possible memory leak. (Bug-ID 1844676) * common.c: fixed a possible double free. (Bug-ID 1844683) @@ -2021,7 +2021,7 @@ create_dynamic_hostconf(duid, pool) if ((host = malloc(sizeof(*host))) == NULL) { dprintf(LOG_ERR, FNAME, "memory allocation failed"); - return (NULL); + goto bad; } memset(host, 0, sizeof(*host)); TAILQ_INIT(&host->prefix_list); @@ -2113,6 +2113,7 @@ create_pool(name, range) } if ((pool->name = strdup(name)) == NULL) { dprintf(LOG_ERR, FNAME, "memory allocation failed"); + free(pool); return (NULL); } pool->min = range->min; |