|
@@ -396,9 +396,11 @@ int delete_presentity_if_dialog_id_exists(presentity_t* presentity, char* dialog
|
|
if(result == NULL)
|
|
if(result == NULL)
|
|
return -3;
|
|
return -3;
|
|
|
|
|
|
- // No results from query definitely means no dialog exists
|
|
|
|
- if (result->n <= 0)
|
|
|
|
|
|
+ /* no results from query definitely means no dialog exists */
|
|
|
|
+ if (result->n <= 0) {
|
|
|
|
+ pa_dbf.free_result(pa_db, result);
|
|
return 0;
|
|
return 0;
|
|
|
|
+ }
|
|
|
|
|
|
// Loop the rows returned from the DB
|
|
// Loop the rows returned from the DB
|
|
for (i=0; i < result->n; i++)
|
|
for (i=0; i < result->n; i++)
|