Module: kamailio
Branch: master
Commit: 5667377c95cfc23cfac24ae67f0af54d959ba636
URL:
https://github.com/kamailio/kamailio/commit/5667377c95cfc23cfac24ae67f0af54…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-12-23T22:37:22+01:00
core: log an error in mk_name_lst_elem if memory allocation failed
---
Modified: src/main.c
---
Diff:
https://github.com/kamailio/kamailio/commit/5667377c95cfc23cfac24ae67f0af54…
Patch:
https://github.com/kamailio/kamailio/commit/5667377c95cfc23cfac24ae67f0af54…
---
diff --git a/src/main.c b/src/main.c
index b7e9fdb58a..4c31bdf13f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -978,8 +978,11 @@ static struct name_lst* mk_name_lst_elem(char* name, int name_len,
int flags)
l->name[name_len]=0;
l->flags=flags;
l->next=0;
+ return l;
+ } else {
+ PKG_MEM_ERROR;
+ return 0;
}
- return l;
}