Module: kamailio
Branch: 5.7
Commit: 402bab6f63b515a13a72ac2dad6e40075ded1479
URL:
https://github.com/kamailio/kamailio/commit/402bab6f63b515a13a72ac2dad6e400…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-06-27T12:58:17+02:00
utils/kamcmd: fix memory leak
fixes #3478
(cherry picked from commit badc81cb427ba5aaf03ca26e4c2654d58ee08588)
---
Modified: utils/kamcmd/kamcmd.c
---
Diff:
https://github.com/kamailio/kamailio/commit/402bab6f63b515a13a72ac2dad6e400…
Patch:
https://github.com/kamailio/kamailio/commit/402bab6f63b515a13a72ac2dad6e400…
---
diff --git a/utils/kamcmd/kamcmd.c b/utils/kamcmd/kamcmd.c
index f3a3a19f11f..97e0a7311d1 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;