Module: kamailio
Branch: master
Commit: 070279f902413023558391249bb579a7717eb391
URL:
https://github.com/kamailio/kamailio/commit/070279f902413023558391249bb579a…
Author: Pantelis Kolatsis <pk(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2023-04-21T17:35:06Z
xlog: improve memory error handling
---
Modified: src/modules/xlog/xlog.c
---
Diff:
https://github.com/kamailio/kamailio/commit/070279f902413023558391249bb579a…
Patch:
https://github.com/kamailio/kamailio/commit/070279f902413023558391249bb579a…
---
diff --git a/src/modules/xlog/xlog.c b/src/modules/xlog/xlog.c
index ea05e51833c..34487fd488a 100644
--- a/src/modules/xlog/xlog.c
+++ b/src/modules/xlog/xlog.c
@@ -234,6 +234,7 @@ static int mod_init(void)
_xlog_prefix_buf = (char*)pkg_malloc((buf_size+1)*sizeof(char));
if(_xlog_prefix_buf==NULL)
{
+ pkg_free(_xlog_buf);
PKG_MEM_ERROR;
return -1;
}