path: root/sgsnemu/sgsnemu.c
diff options
authorHarald Welte <laforge@gnumonks.org>2017-11-06 03:09:35 +0900
committerHarald Welte <laforge@gnumonks.org>2017-11-06 03:10:31 +0900
commitb589e78f13243ad4372dcf33f611e630b2a953e8 (patch)
treef791b07742f32b4b2319247e74a94c0c65710f7a /sgsnemu/sgsnemu.c
parentb11ed0f1321f0567e6fc2e6eb467e5276932da82 (diff)
sgsnemu: Free strings in error path
In create_pdp_conf(), we have to free() any strings both in the success and in the error case. Change-Id: If59cc8d6d151c123f46c1d029091209fd82b3c8e Fixes: Coverity CID#187636, CID#187633
Diffstat (limited to 'sgsnemu/sgsnemu.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/sgsnemu/sgsnemu.c b/sgsnemu/sgsnemu.c
index 0b0fba6..c31f875 100644
--- a/sgsnemu/sgsnemu.c
+++ b/sgsnemu/sgsnemu.c
@@ -1459,9 +1459,9 @@ static int create_pdp_conf(struct pdp_t *pdp, void *cbp, int cause)
"router advertisements; SLAAC will not suceed, please "
"fix your setup!\n");
- free(accept_ra);
- free(forwarding);
+ free(accept_ra);
+ free(forwarding);
ipset((struct iphash_t *)pdp->peer, &addr);