Module: kamailio
Branch: master
Commit: 33921b79a4f5849f85a588332fe8debfb4d27c0e
URL:
https://github.com/kamailio/kamailio/commit/33921b79a4f5849f85a588332fe8deb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-04-28T13:42:21+02:00
cfgt: free dest.s before return on error
---
Modified: src/modules/cfgt/cfgt_int.c
---
Diff:
https://github.com/kamailio/kamailio/commit/33921b79a4f5849f85a588332fe8deb…
Patch:
https://github.com/kamailio/kamailio/commit/33921b79a4f5849f85a588332fe8deb…
---
diff --git a/src/modules/cfgt/cfgt_int.c b/src/modules/cfgt/cfgt_int.c
index b8345b4565..489fdfe445 100644
--- a/src/modules/cfgt/cfgt_int.c
+++ b/src/modules/cfgt/cfgt_int.c
@@ -394,6 +394,7 @@ void cfgt_save_node(cfgt_node_p node)
LM_DBG("dir [%s] already exists\n", dest.s);
} else if(mkdir(dest.s, S_IRWXO | S_IXGRP | S_IRWXU) < 0) {
LM_ERR("failed to make directory: %s\n", strerror(errno));
+ pkg_free(dest.s);
return;
}
dest.s[dir] = '/';