Browse Source

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

Miklos Tirpak 17 years ago
parent
commit
0e41da756b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      cfg/cfg_ctx.c

+ 2 - 1
cfg/cfg_ctx.c

@@ -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,
 		/* the global config does not have to be replaced,
 		but the child callback has to be installed, otherwise the
 		but the child callback has to be installed, otherwise the
 		child processes will miss the change */
 		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)
 	if (val_type == CFG_VAR_INT)