[sr-dev] git:master: outbound: Fix freeing null pointer in destroy function
Hugh Waite
hugh.waite at crocodile-rcs.com
Mon Aug 12 12:35:03 CEST 2013
Module: sip-router
Branch: master
Commit: e88af0a02de79fac583c126f08d762f7ef3f1b01
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e88af0a02de79fac583c126f08d762f7ef3f1b01
Author: Hugh Waite <hugh.waite at crocodile-rcs.com>
Committer: Hugh Waite <hugh.waite at crocodile-rcs.com>
Date: Tue Jul 16 10:51:29 2013 +0100
outbound: Fix freeing null pointer in destroy function
- Only appears in error cases, e.g. syntax check
---
modules/outbound/ob_mod.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/outbound/ob_mod.c b/modules/outbound/ob_mod.c
index 04f2e38..0233ee5 100644
--- a/modules/outbound/ob_mod.c
+++ b/modules/outbound/ob_mod.c
@@ -127,7 +127,8 @@ static int mod_init(void)
static void destroy(void)
{
- shm_free(ob_key.s);
+ if (ob_key.s)
+ shm_free(ob_key.s);
}
/* Structure of flow-token
More information about the sr-dev
mailing list