Module: kamailio
Branch: 5.5
Commit: f39f320b6be93eb20936805b4e0396ce48da7985
URL:
https://github.com/kamailio/kamailio/commit/f39f320b6be93eb20936805b4e0396c…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-06-27T13:01:24+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/f39f320b6be93eb20936805b4e0396c…
Patch:
https://github.com/kamailio/kamailio/commit/f39f320b6be93eb20936805b4e0396c…
---
diff --git a/utils/kamcmd/kamcmd.c b/utils/kamcmd/kamcmd.c
index 2d1cd9c93be..b302c4a6dad 100644
--- a/utils/kamcmd/kamcmd.c
+++ b/utils/kamcmd/kamcmd.c
@@ -1399,6 +1399,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;