diff options
author | SUZUKI, Shinsuke <suz@kame.net> | 2007-12-06 14:47:19 +0000 |
---|---|---|
committer | Bjørn Mork <bjorn@mork.no> | 2010-08-06 15:37:37 +0200 |
commit | df3983775c32b6ee2167d773c1f7a5f3b41a2dab (patch) | |
tree | 261b6aca07ee290476d6e114795c84627b0b2dd2 | |
parent | d6cffd62c58e295d4dad72ef45ba39f202f9374c (diff) |
fixed a possible double free. (Bug-ID 1844683)
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | common.c | 3 |
2 files changed, 6 insertions, 0 deletions
@@ -1,3 +1,6 @@ +2007-12-06 SUZUKI, Shinsuke <suz@kame.net> + * common.c: fixed a possible double free. (Bug-ID 1844683) + 2007-07-25 SUZUKI, Shinsuke <suz@kame.net> * config.c, lease.h, common.c: removed compilation warnings @@ -2289,6 +2289,7 @@ dhcp6_set_options(type, optbp, optep, optinfo) } memcpy(p, tmpbuf, optlen); free(tmpbuf); + tmpbuf = NULL; p = (struct dhcp6opt *)((char *)p + optlen); len += optlen; } @@ -2369,6 +2370,7 @@ dhcp6_set_options(type, optbp, optep, optinfo) goto fail; } free(tmpbuf); + tmpbuf = NULL; } if (dhcp6_set_domain(DH6OPT_SIP_SERVER_D, &optinfo->sipname_list, @@ -2441,6 +2443,7 @@ dhcp6_set_options(type, optbp, optep, optinfo) } memcpy(p, tmpbuf, optlen); free(tmpbuf); + tmpbuf = NULL; p = (struct dhcp6opt *)((char *)p + optlen); len += optlen; } |