Skip to content

Commit

Permalink
auth_ephemeral: convert to memory logging helper
Browse files Browse the repository at this point in the history
  • Loading branch information
pantelisk98 authored and henningw committed Mar 29, 2023
1 parent bc47875 commit 19c9d56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/auth_ephemeral/auth_ephemeral_mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ static inline int add_secret(str _secret_key)
secret_struct = (struct secret *) shm_malloc(sizeof(struct secret));
if (secret_struct == NULL)
{
LM_ERR("unable to allocate shared memory\n");
SHM_MEM_ERROR;
return -1;
}

Expand Down Expand Up @@ -313,7 +313,7 @@ static int secret_param(modparam_t _type, void *_val)
sval.s = (char *) shm_malloc(sizeof(char) * sval.len);
if (sval.s == NULL)
{
LM_ERR("unable to allocate shared memory\n");
SHM_MEM_ERROR;
return -1;
}
memcpy(sval.s, (char *) _val, sval.len);
Expand Down Expand Up @@ -363,7 +363,7 @@ void autheph_rpc_add_secret(rpc_t* rpc, void* ctx)
sval.s = shm_malloc(sizeof(char) * sval.len);
if (sval.s == NULL)
{
LM_ERR("Unable to allocate shared memory\n");
SHM_MEM_ERROR;
rpc->fault(ctx, 500, "Not enough memory");
return;
}
Expand Down

0 comments on commit 19c9d56

Please sign in to comment.