Skip to content

Commit

Permalink
stun: convert to memory logging helper
Browse files Browse the repository at this point in the history
  • Loading branch information
pantelisk98 authored and henningw committed Apr 24, 2023
1 parent 83789e7 commit 7747f91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/stun/kam_stun.c
Expand Up @@ -408,7 +408,7 @@ static int stun_create_response(
*/
res->msg.buf.s = (char *) pkg_malloc(sizeof(char)*STUN_MSG_LEN);
if (res->msg.buf.s == NULL) {
LOG(L_ERR, "ERROR: STUN: out of memory\n");
PKG_MEM_ERROR;
return FATAL_ERROR;
}

Expand Down Expand Up @@ -822,7 +822,7 @@ static struct stun_unknown_att* stun_alloc_unknown_attr(USHORT_T type)

attr = (struct stun_unknown_att *) pkg_malloc(sizeof(struct stun_unknown_att));
if (attr == NULL) {
LOG(L_ERR, "ERROR: STUN: out of memory\n");
PKG_MEM_ERROR;
return NULL;
}

Expand Down

0 comments on commit 7747f91

Please sign in to comment.