Module: kamailio
Branch: master
Commit: 1c7809b1f7e0ac5c4a08cda686f3cf867281eb7a
URL:
https://github.com/kamailio/kamailio/commit/1c7809b1f7e0ac5c4a08cda686f3cf8…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-02-13T23:08:35+01:00
uac_redirect: convert to memory logging helper
---
Modified: src/modules/uac_redirect/uac_redirect.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1c7809b1f7e0ac5c4a08cda686f3cf8…
Patch:
https://github.com/kamailio/kamailio/commit/1c7809b1f7e0ac5c4a08cda686f3cf8…
---
diff --git a/src/modules/uac_redirect/uac_redirect.c
b/src/modules/uac_redirect/uac_redirect.c
index 31507c4e47..57ec038b39 100644
--- a/src/modules/uac_redirect/uac_redirect.c
+++ b/src/modules/uac_redirect/uac_redirect.c
@@ -180,7 +180,7 @@ static int get_redirect_fixup(void** param, int param_no)
/* set the reason str */
accp = (struct acc_param*)pkg_malloc(sizeof(struct acc_param));
if (accp==0) {
- LM_ERR("no more pkg mem\n");
+ PKG_MEM_ERROR;
return E_UNSPEC;
}
memset( accp, 0, sizeof(struct acc_param));
@@ -241,8 +241,10 @@ static int regexp_compile(char *re_s, regex_t **re)
if (re_s==0 || strlen(re_s)==0 ) {
return 0;
} else {
- if ((*re=pkg_malloc(sizeof(regex_t)))==0)
+ if ((*re=pkg_malloc(sizeof(regex_t)))==0) {
+ PKG_MEM_ERROR;
return E_OUT_OF_MEM;
+ }
if (regcomp(*re, re_s, REG_EXTENDED|REG_ICASE|REG_NEWLINE) ){
pkg_free(*re);
*re = 0;