aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSUZUKI, Shinsuke <suz@kame.net>2007-12-06 14:47:19 +0000
committerSUZUKI, Shinsuke <suz@kame.net>2007-12-06 14:47:19 +0000
commit8e29943c96d5b54d4ef734d675f261b53df486e1 (patch)
tree261b6aca07ee290476d6e114795c84627b0b2dd2
parent5c8f276cb5008af5a793471818458b2d9ef90457 (diff)
fixed a possible double free. (Bug-ID 1844683)
-rw-r--r--CHANGES3
-rw-r--r--common.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 27dba0d..4a6b44b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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
diff --git a/common.c b/common.c
index 8011423..c8ff7e9 100644
--- a/common.c
+++ b/common.c
@@ -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;
}