Skip to content

Commit 2641feb

Browse files
committed
Fix double free in case of errors when running MI command
(cherry picked from commit ce6e844)
1 parent 7de5534 commit 2641feb

File tree

3 files changed

+0
-3
lines changed

3 files changed

+0
-3
lines changed

modules/mi_http/http_fnc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,6 @@ struct mi_root* mi_http_run_mi_cmd(int mod, int cmd, const str* arg,
619619
(mi_flush_f *)mi_http_flush_tree, &html_page_data);
620620
if (mi_rpl == NULL) {
621621
LM_ERR("failed to process the command\n");
622-
if (mi_cmd) free_mi_tree(mi_cmd);
623622
goto error;
624623
} else {
625624
*page = html_page_data.page;

modules/mi_json/http_fnc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ struct mi_root* mi_json_run_mi_cmd(struct mi_cmd *f, const str* miCmd,
318318
NULL, &html_page_data);
319319
if (mi_rpl == NULL) {
320320
LM_ERR("failed to process the command\n");
321-
if (mi_cmd) free_mi_tree(mi_cmd);
322321
goto error;
323322
} else {
324323
*page = html_page_data.page;

modules/mi_xmlrpc_ng/http_fnc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,6 @@ struct mi_root* mi_xmlrpc_http_run_mi_cmd(const str* arg,
551551
(mi_flush_f *)mi_xmlrpc_http_flush_tree, &html_page_data);
552552
if (mi_rpl == NULL) {
553553
LM_ERR("failed to process the command\n");
554-
if (mi_cmd) free_mi_tree(mi_cmd);
555554
goto xml_error;
556555
} else {
557556
*page = html_page_data.page;

0 commit comments

Comments
 (0)