Module: kamailio Branch: master Commit: 7747f91f6c482a99cfab4813e3b2ad5e6e970d07 URL: https://github.com/kamailio/kamailio/commit/7747f91f6c482a99cfab4813e3b2ad5e...
Author: Pantelis Kolatsis pk@gilawa.com Committer: Henning Westerholt hw@gilawa.com Date: 2023-04-24T19:06:41Z
stun: convert to memory logging helper
---
Modified: src/modules/stun/kam_stun.c
---
Diff: https://github.com/kamailio/kamailio/commit/7747f91f6c482a99cfab4813e3b2ad5e... Patch: https://github.com/kamailio/kamailio/commit/7747f91f6c482a99cfab4813e3b2ad5e...
---
diff --git a/src/modules/stun/kam_stun.c b/src/modules/stun/kam_stun.c index 04f52fa2bfd..0ddbb00ed1c 100644 --- a/src/modules/stun/kam_stun.c +++ b/src/modules/stun/kam_stun.c @@ -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; } @@ -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; }