瀏覽代碼

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

Miklos Tirpak 17 年之前
父節點
當前提交
0e41da756b
共有 1 個文件被更改,包括 2 次插入1 次删除
  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,
 		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)