Module: kamailio
Branch: 5.6
Commit: edd4744a4cd7be96549f5515512187b801335d66
URL:
https://github.com/kamailio/kamailio/commit/edd4744a4cd7be96549f5515512187b…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-06-27T13:00:56+02:00
utils/kamcmd: fix memory leak
fixes #3478
(cherry picked from commit badc81cb427ba5aaf03ca26e4c2654d58ee08588)
(cherry picked from commit 402bab6f63b515a13a72ac2dad6e40075ded1479)
---
Modified: utils/kamcmd/kamcmd.c
---
Diff:
https://github.com/kamailio/kamailio/commit/edd4744a4cd7be96549f5515512187b…
Patch:
https://github.com/kamailio/kamailio/commit/edd4744a4cd7be96549f5515512187b…
---
diff --git a/utils/kamcmd/kamcmd.c b/utils/kamcmd/kamcmd.c
index 459fbfc30ae..e5b91430360 100644
--- a/utils/kamcmd/kamcmd.c
+++ b/utils/kamcmd/kamcmd.c
@@ -1403,6 +1403,8 @@ void free_cfg_grp_lst()
while(grp){
last=grp;
grp=grp->next;
+ if(last->var_names)
+ free(last->var_names);
free(last);
}
cfg_grp_lst=0;