Skip to content

Commit

Permalink
xlog: improve memory error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
pantelisk98 authored and henningw committed Apr 21, 2023
1 parent ad68787 commit 070279f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/modules/xlog/xlog.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 070279f

Please sign in to comment.