Skip to content

Commit

Permalink
xlog: convert to memory logging helper
Browse files Browse the repository at this point in the history
  • Loading branch information
henningw committed Jan 25, 2020
1 parent 0903f5d commit 63a9d4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/xlog/xlog.c
Expand Up @@ -212,7 +212,7 @@ static int mod_init(void)
_xlog_buf = (char*)pkg_malloc((buf_size+1)*sizeof(char));
if(_xlog_buf==NULL)
{
LM_ERR("no pkg memory left\n");
PKG_MEM_ERROR;
return -1;
}
return 0;
Expand Down Expand Up @@ -498,7 +498,7 @@ static int xdbg_fixup_helper(void** param, int param_no, int mode)
xm = (xl_msg_t*)pkg_malloc(sizeof(xl_msg_t));
if(xm==NULL)
{
LM_ERR("no more pkg\n");
PKG_MEM_ERROR;
return -1;
}
memset(xm, 0, sizeof(xl_msg_t));
Expand Down Expand Up @@ -533,7 +533,7 @@ static int xlog_fixup_helper(void** param, int param_no, int mode)
xlp = (xl_level_p)pkg_malloc(sizeof(xl_level_t));
if(xlp == NULL)
{
LM_ERR("no more memory\n");
PKG_MEM_ERROR;
return E_UNSPEC;
}
memset(xlp, 0, sizeof(xl_level_t));
Expand Down Expand Up @@ -592,7 +592,7 @@ static int xlog3_fixup_helper(void** param, int param_no)
facility = (int*)pkg_malloc(sizeof(int));
if(facility == NULL)
{
LM_ERR("no more memory\n");
PKG_MEM_ERROR;
return E_UNSPEC;
}
*facility = str2facility(s.s);
Expand Down

0 comments on commit 63a9d4f

Please sign in to comment.