Module: kamailio
Branch: master
Commit: badc81cb427ba5aaf03ca26e4c2654d58ee08588
URL:
https://github.com/kamailio/kamailio/commit/badc81cb427ba5aaf03ca26e4c2654d…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2023-06-23T09:07:07+02:00
utils/kamcmd: fix memory leak
fixes #3478
---
Modified: utils/kamcmd/kamcmd.c
---
Diff:
https://github.com/kamailio/kamailio/commit/badc81cb427ba5aaf03ca26e4c2654d…
Patch:
https://github.com/kamailio/kamailio/commit/badc81cb427ba5aaf03ca26e4c2654d…
---
diff --git a/utils/kamcmd/kamcmd.c b/utils/kamcmd/kamcmd.c
index b4a8cad8eeb..9190b6138ac 100644
--- a/utils/kamcmd/kamcmd.c
+++ b/utils/kamcmd/kamcmd.c
@@ -1395,6 +1395,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;