Browse code

NULL child callback value was not checked, when a cfg driver called cfg_set_now() before forking.

Miklos Tirpak authored on 20/02/2008 14:52:23
Showing 1 changed files
... ...
@@ -387,7 +387,8 @@ int cfg_set_now(cfg_ctx_t *ctx, str *group_name, str *var_name,
387 387
 		/* the global config does not have to be replaced,
388 388
 		but the child callback has to be installed, otherwise the
389 389
 		child processes will miss the change */
390
-		cfg_install_child_cb(child_cb, child_cb);
390
+		if (child_cb)
391
+			cfg_install_child_cb(child_cb, child_cb);
391 392
 	}
392 393
 
393 394
 	if (val_type == CFG_VAR_INT)