Module: kamailio
Branch: master
Commit: c37e00326969c4be565a030708778a64714926e5
URL:
https://github.com/kamailio/kamailio/commit/c37e00326969c4be565a030708778a6…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-05-14T10:48:44+02:00
siptrace: free trace_to_database_flag on module destroy
---
Modified: src/modules/siptrace/siptrace.c
---
Diff:
https://github.com/kamailio/kamailio/commit/c37e00326969c4be565a030708778a6…
Patch:
https://github.com/kamailio/kamailio/commit/c37e00326969c4be565a030708778a6…
---
diff --git a/src/modules/siptrace/siptrace.c b/src/modules/siptrace/siptrace.c
index 92e2019917..dfdbdcd409 100644
--- a/src/modules/siptrace/siptrace.c
+++ b/src/modules/siptrace/siptrace.c
@@ -495,13 +495,16 @@ static int child_init(int rank)
static void destroy(void)
{
- if(trace_to_database_flag != NULL && *trace_to_database_flag != 0) {
- if(db_con != NULL)
+ if(trace_to_database_flag != NULL) {
+ if(db_con != NULL) {
db_funcs.close(db_con);
+ }
+ shm_free(trace_to_database_flag);
}
- if(trace_on_flag)
+ if(trace_on_flag) {
shm_free(trace_on_flag);
+ }
}
static inline str *siptrace_get_table(void)