- Error message is logged for dynlibmod malloc failures.

This commit is contained in:
W.C.A. Wijngaards 2020-09-21 10:20:10 +02:00
parent 9d78ad6898
commit 1175269bbd
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,6 @@
21 September 2020: Wouter
- Merge PR #311 by luismerino: Dynlibmod leak.
- Error message is logged for dynlibmod malloc failures.
18 September 2020: Wouter
- Fix that prefer-ip4 and prefer-ip6 can be get and set with

View file

@ -242,8 +242,10 @@ int
inplace_cb_register_wrapped(void* cb, enum inplace_cb_list_type type, void* cbarg,
struct module_env* env, int id) {
struct cb_pair* cb_pair = malloc(sizeof(struct cb_pair));
if(cb_pair == NULL)
if(cb_pair == NULL) {
log_err("dynlibmod[%d]: malloc failure", id);
return 0;
}
cb_pair->cb = cb;
cb_pair->cb_arg = cbarg;
if(type >= inplace_cb_reply && type <= inplace_cb_reply_servfail) {