Переглянути джерело

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)