Browse code

uac_redirect: convert to memory logging helper

Henning Westerholt authored on 13/02/2020 21:40:27
Showing 1 changed files
... ...
@@ -180,7 +180,7 @@ static int get_redirect_fixup(void** param, int param_no)
180 180
 		/* set the reason str */
181 181
 		accp = (struct acc_param*)pkg_malloc(sizeof(struct acc_param));
182 182
 		if (accp==0) {
183
-			LM_ERR("no more pkg mem\n");
183
+			PKG_MEM_ERROR;
184 184
 			return E_UNSPEC;
185 185
 		}
186 186
 		memset( accp, 0, sizeof(struct acc_param));
... ...
@@ -241,8 +241,10 @@ static int regexp_compile(char *re_s, regex_t **re)
241 241
 	if (re_s==0 || strlen(re_s)==0 ) {
242 242
 		return 0;
243 243
 	} else {
244
-		if ((*re=pkg_malloc(sizeof(regex_t)))==0)
244
+		if ((*re=pkg_malloc(sizeof(regex_t)))==0) {
245
+			PKG_MEM_ERROR;
245 246
 			return E_OUT_OF_MEM;
247
+		}
246 248
 		if (regcomp(*re, re_s, REG_EXTENDED|REG_ICASE|REG_NEWLINE) ){
247 249
 			pkg_free(*re);
248 250
 			*re = 0;