Module: sip-router
Branch: 3.3
Commit: d772b44f8fee63043afb6aa1d0e3442d7295f2a3
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=d772b44…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Jun 14 12:24:36 2012 +0200
pua: remove wrong free of TM callback param in send_publish()
- reported by Charles Chance and Juha Heinanen
(cherry picked from commit 1d89d7bea854c2e2c646b5d13ba215795325b50f)
---
modules_k/pua/send_publish.c | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/modules_k/pua/send_publish.c b/modules_k/pua/send_publish.c
index cfc759f..3bc8702 100644
--- a/modules_k/pua/send_publish.c
+++ b/modules_k/pua/send_publish.c
@@ -695,15 +695,24 @@ done:
goto error;
}
}
+ goto finish;
error:
- if(etag.s)
- pkg_free(etag.s);
-
+ ret = -1;
if(cb_param)
shm_free(cb_param);
- if(body&& ret_code)
+ if (dbmode == PUA_DB_ONLY && pua_dbf.abort_transaction)
+ {
+ if (pua_dbf.abort_transaction(pua_db) < 0)
+ LM_ERR("in abort_transaction\n");
+ }
+
+finish:
+ if(etag.s)
+ pkg_free(etag.s);
+
+ if(body && ret_code)
{
if(body->s)
xmlFree(body->s);
@@ -719,12 +728,6 @@ error:
}
free_results_puadb(res);
- if (dbmode == PUA_DB_ONLY && pua_dbf.abort_transaction)
- {
- if (pua_dbf.abort_transaction(pua_db) < 0)
- LM_ERR("in abort_transaction\n");
- }
-
return ret;
}