From 070279f902413023558391249bb579a7717eb391 Mon Sep 17 00:00:00 2001 From: Pantelis Kolatsis Date: Fri, 21 Apr 2023 17:35:06 +0000 Subject: [PATCH] xlog: improve memory error handling --- src/modules/xlog/xlog.c | 1 + 1 file changed, 1 insertion(+) 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; }