Module: kamailio
Branch: master
Commit: 55f23d09faee06a892dde13e371d144b98bae68f
URL:
https://github.com/kamailio/kamailio/commit/55f23d09faee06a892dde13e371d144…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-01-11T08:30:46+01:00
rls: free xml doc in case of error
---
Modified: src/modules/rls/resource_notify.c
---
Diff:
https://github.com/kamailio/kamailio/commit/55f23d09faee06a892dde13e371d144…
Patch:
https://github.com/kamailio/kamailio/commit/55f23d09faee06a892dde13e371d144…
---
diff --git a/src/modules/rls/resource_notify.c b/src/modules/rls/resource_notify.c
index d42c29666b..0f31e7c877 100644
--- a/src/modules/rls/resource_notify.c
+++ b/src/modules/rls/resource_notify.c
@@ -183,6 +183,7 @@ static void send_notifies(db1_res_t *result, int did_col, int
resource_uri_col,
subs_t* dialog= NULL;
int len_est = 0;
int resource_added = 0; /* Flag to indicate that we have added at least one resource */
+ int ok = 0;
/* generate the boundary string */
boundary_string= generate_string(BOUNDARY_STRING_LEN);
@@ -430,6 +431,7 @@ static void send_notifies(db1_res_t *result, int did_col, int
resource_uri_col,
}
done:
+ ok = 1;
if (dbmode == RLS_DB_ONLY && rls_dbf.end_transaction)
{
if (rls_dbf.end_transaction(rls_db) < 0)
@@ -454,6 +456,11 @@ static void send_notifies(db1_res_t *result, int did_col, int
resource_uri_col,
LM_ERR("in abort_transaction\n");
}
+ if(ok==0) {
+ if(rlmi_doc!=NULL) {
+ xmlFreeDoc(rlmi_doc);
+ }
+ }
return;
}