]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_v8] Fix false-positive memory leak detected in process_status_function() by...
authorAndrey Volk <andywolk@gmail.com>
Tue, 6 Apr 2021 17:06:10 +0000 (20:06 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 19 Oct 2021 17:24:09 +0000 (20:24 +0300)
src/mod/languages/mod_v8/mod_v8.cpp

index c05991529196453b502bf1961ad9add3f89031cf..b297fa39e1fd9e23542fbcad59e95f2b1ac4aed5 100644 (file)
@@ -1376,7 +1376,7 @@ SWITCH_STANDARD_API(process_status_function)
                        }
 
                        switch_snprintf(tmp_str, sizeof(tmp_str), "%d", rows);
-                       switch_xml_set_attr(switch_xml_set_flag(xml_row, SWITCH_XML_DUP), strdup("row_id"), strdup(tmp_str));
+                       switch_xml_set_attr_d(xml_row, "row_id", tmp_str);
 
                        if (!(xml_field = switch_xml_add_child_d(xml_row, "task_id", f_off++))) {                               
                                goto end;