]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Error message is logged for dynlibmod malloc failures.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 21 Sep 2020 08:20:10 +0000 (10:20 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 21 Sep 2020 08:20:10 +0000 (10:20 +0200)
doc/Changelog
dynlibmod/dynlibmod.c

index fe5b8da161b7ff49156555530794efa6bff703da..45baef30f7e592492ab4681faf0917adfd72ea1d 100644 (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
index 10ae143a47f5879fafb53180549d182586ccffdb..3bf9d1acb0b858ea86e9607f8a477c87a74d4b28 100644 (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) {