Module: sip-router Branch: master Commit: 9d9d51438acd1d534f14ecbc8eb0030b45333177 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9d9d51438acd1d534f14ecbc8eb0030b45333177
Author: Peter Dunkley <[email protected]> Committer: Peter Dunkley <[email protected]> Date: Fri Mar 15 14:54:41 2013 +0000 modules/outbound: free shared memory for flow-token key during shutdown --- modules/outbound/ob_mod.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/modules/outbound/ob_mod.c b/modules/outbound/ob_mod.c index 4c4e7ea..7cf0c74 100644 --- a/modules/outbound/ob_mod.c +++ b/modules/outbound/ob_mod.c @@ -43,6 +43,7 @@ MODULE_VERSION #define OB_KEY_LEN 20 static int mod_init(void); +static void destroy(void); static unsigned int ob_force_flag = (unsigned int) -1; static str ob_key = {0, 0}; @@ -73,7 +74,7 @@ struct module_exports exports= 0, /* extra processes */ mod_init, /* module initialization function */ 0, /* response function */ - 0, /* destroy function */ + destroy, /* destroy function */ 0 /* per-child initialization function */ }; @@ -100,6 +101,11 @@ static int mod_init(void) return 0; } +static void destroy(void) +{ + shm_free(ob_key.s); +} + /* Structure of flow-token <HMAC-SHA1-80><protocol><dst_ip><dst_port><src_ip><src_port> _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
