[sr-dev] git:master:3c09579d: presence: fix memory leak introduced by last commit
Phil Lavin
phil.lavin at synety.com
Mon Aug 22 09:40:58 CEST 2016
Module: kamailio
Branch: master
Commit: 3c09579d5e677ac7a27b2386545dc580697934b5
URL: https://github.com/kamailio/kamailio/commit/3c09579d5e677ac7a27b2386545dc580697934b5
Author: Phil Lavin <phil.lavin at synety.com>
Committer: Phil Lavin <phil.lavin at synety.com>
Date: 2016-07-25T14:39:35+01:00
presence: fix memory leak introduced by last commit
---
Modified: modules/presence/presentity.c
---
Diff: https://github.com/kamailio/kamailio/commit/3c09579d5e677ac7a27b2386545dc580697934b5.diff
Patch: https://github.com/kamailio/kamailio/commit/3c09579d5e677ac7a27b2386545dc580697934b5.patch
---
diff --git a/modules/presence/presentity.c b/modules/presence/presentity.c
index 549f753..33947dc 100644
--- a/modules/presence/presentity.c
+++ b/modules/presence/presentity.c
@@ -550,6 +550,8 @@ int update_presentity(struct sip_msg* msg, presentity_t* presentity, str* body,
goto error;
}
+ free(dialog_id);
+
LM_DBG("inserting %d cols into table\n",n_query_cols);
if (pa_dbf.insert(pa_db, query_cols, query_vals, n_query_cols) < 0)
@@ -650,9 +652,10 @@ int update_presentity(struct sip_msg* msg, presentity_t* presentity, str* body,
goto error;
}
+ free(dialog_id);
+
if(is_dialog== 1) /* if the new body has a dialog - overwrite */
{
- free(dialog_id);
goto after_dialog_check;
}
More information about the sr-dev
mailing list