Skip to content

Commit

Permalink
kex: convert to memory logging helper, add missing mem error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pantelisk98 authored and henningw committed Apr 25, 2023
1 parent 2c97669 commit 78e658c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/kex/km_core.c
Expand Up @@ -76,7 +76,7 @@ int pv_printf_fixup(void** param, int param_no)
spec = (pv_spec_t*)pkg_malloc(sizeof(pv_spec_t));
if(spec==NULL)
{
LM_ERR("out of pkg\n");
PKG_MEM_ERROR;
return -1;
}
memset(spec, 0, sizeof(pv_spec_t));
Expand Down
3 changes: 3 additions & 0 deletions src/modules/kex/pkg_stats.c
Expand Up @@ -78,7 +78,10 @@ int pkg_proc_stats_init(void)
_pkg_proc_stats_list = (pkg_proc_stats_t*)shm_malloc(
_pkg_proc_stats_no*sizeof(pkg_proc_stats_t));
if(_pkg_proc_stats_list==NULL)
{
SHM_MEM_ERROR;
return -1;
}
memset(_pkg_proc_stats_list, 0,
_pkg_proc_stats_no*sizeof(pkg_proc_stats_t));
return 0;
Expand Down

0 comments on commit 78e658c

Please sign in to comment.