NULL child callback value was not checked, when a cfg driver called
authorMiklos Tirpak <miklos@iptel.org>
Wed, 20 Feb 2008 14:52:23 +0000 (14:52 +0000)
committerMiklos Tirpak <miklos@iptel.org>
Wed, 20 Feb 2008 14:52:23 +0000 (14:52 +0000)
cfg_set_now() before forking.

cfg/cfg_ctx.c

index 503a486..b4443a5 100644 (file)
@@ -387,7 +387,8 @@ int cfg_set_now(cfg_ctx_t *ctx, str *group_name, str *var_name,
                /* the global config does not have to be replaced,
                but the child callback has to be installed, otherwise the
                child processes will miss the change */
-               cfg_install_child_cb(child_cb, child_cb);
+               if (child_cb)
+                       cfg_install_child_cb(child_cb, child_cb);
        }
 
        if (val_type == CFG_VAR_INT)