Module: kamailio
Branch: master
Commit: 19df3ad8f3e10b6c9fa91e69f288fdbd51be7091
URL:
https://github.com/kamailio/kamailio/commit/19df3ad8f3e10b6c9fa91e69f288fdb…
Author: Pantelis Kolatsis <pk(a)gilawa.com>
Committer: Henning Westerholt <hw(a)gilawa.com>
Date: 2023-04-24T19:24:24Z
uid_auth_db: convert to memory logging helper
---
Modified: src/modules/uid_auth_db/aaa_avps.h
Modified: src/modules/uid_auth_db/uid_auth_db_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/19df3ad8f3e10b6c9fa91e69f288fdb…
Patch:
https://github.com/kamailio/kamailio/commit/19df3ad8f3e10b6c9fa91e69f288fdb…
---
diff --git a/src/modules/uid_auth_db/aaa_avps.h b/src/modules/uid_auth_db/aaa_avps.h
index 62f1062bf3d..25b6cbeda3b 100644
--- a/src/modules/uid_auth_db/aaa_avps.h
+++ b/src/modules/uid_auth_db/aaa_avps.h
@@ -76,7 +76,7 @@ static int aaa_avps_init(str *avp_list, str **parsed_avps, int *avps_n)
cp = pkg_malloc(avp_list->len + 1);
if (cp == NULL) {
- LM_ERR("can't allocate memory\n");
+ PKG_MEM_ERROR;
errcode = -1;
goto bad;
}
diff --git a/src/modules/uid_auth_db/uid_auth_db_mod.c
b/src/modules/uid_auth_db/uid_auth_db_mod.c
index 781ff37220f..2fd206bb970 100644
--- a/src/modules/uid_auth_db/uid_auth_db_mod.c
+++ b/src/modules/uid_auth_db/uid_auth_db_mod.c
@@ -172,7 +172,7 @@ static int generate_queries(authdb_table_info_t *info)
len = sizeof(*result_cols) * (credentials_n + 3);
result_cols = pkg_malloc(len);
if (!result_cols) {
- ERR("can't allocate pkg mem\n");
+ PKG_MEM_ERROR;
return -1;
}
memset(result_cols, 0, len);
@@ -321,7 +321,7 @@ static authdb_table_info_t *register_table(str *table)
info = (authdb_table_info_t*)pkg_malloc(sizeof(authdb_table_info_t)
+ table->len + 1);
if (!info) {
- LM_ERR("can't allocate pkg mem\n");
+ PKG_MEM_ERROR;
return NULL;
}