... | ... |
@@ -183,6 +183,7 @@ static void send_notifies(db1_res_t *result, int did_col, int resource_uri_col, |
183 | 183 |
subs_t* dialog= NULL; |
184 | 184 |
int len_est = 0; |
185 | 185 |
int resource_added = 0; /* Flag to indicate that we have added at least one resource */ |
186 |
+ int ok = 0; |
|
186 | 187 |
|
187 | 188 |
/* generate the boundary string */ |
188 | 189 |
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, |
430 | 431 |
} |
431 | 432 |
|
432 | 433 |
done: |
434 |
+ ok = 1; |
|
433 | 435 |
if (dbmode == RLS_DB_ONLY && rls_dbf.end_transaction) |
434 | 436 |
{ |
435 | 437 |
if (rls_dbf.end_transaction(rls_db) < 0) |
... | ... |
@@ -454,6 +456,11 @@ error: |
454 | 456 |
LM_ERR("in abort_transaction\n"); |
455 | 457 |
} |
456 | 458 |
|
459 |
+ if(ok==0) { |
|
460 |
+ if(rlmi_doc!=NULL) { |
|
461 |
+ xmlFreeDoc(rlmi_doc); |
|
462 |
+ } |
|
463 |
+ } |
|
457 | 464 |
return; |
458 | 465 |
} |
459 | 466 |
|