Module: kamailio
Branch: 5.4
Commit: dc938876d4434afe649a374979fcca4bb4b1f103
URL:
https://github.com/kamailio/kamailio/commit/dc938876d4434afe649a374979fcca4…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-06-27T13:01:48+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/dc938876d4434afe649a374979fcca4…
Patch:
https://github.com/kamailio/kamailio/commit/dc938876d4434afe649a374979fcca4…
---
diff --git a/utils/kamcmd/kamcmd.c b/utils/kamcmd/kamcmd.c
index eee600c9abc..489ac08af16 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;