From: Andrey Volk Date: Wed, 20 Jan 2021 19:31:35 +0000 (+0300) Subject: [Unit-Tests] Fix leak of arg in the case of an error in fct_clp__parse() X-Git-Tag: v1.10.6^2~31 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=c8e7a57b4c177c19d9289e0c5db76a720c9a1e16;p=thirdparty%2Ffreeswitch.git [Unit-Tests] Fix leak of arg in the case of an error in fct_clp__parse() --- diff --git a/src/include/test/switch_fct.h b/src/include/test/switch_fct.h index a9b3595d0e..f88821b49c 100644 --- a/src/include/test/switch_fct.h +++ b/src/include/test/switch_fct.h @@ -1716,6 +1716,12 @@ fct_clp__parse(fct_clp_t *clp, int argc, char const *argv[]) arg =NULL; } } + + if (arg != NULL) + { + free(arg); + arg = NULL; + } }