]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[settings] Correctly mortalise autovivified child settings blocks
authorMichael Brown <mcb30@ipxe.org>
Mon, 18 Jul 2016 22:52:40 +0000 (23:52 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 18 Jul 2016 23:13:00 +0000 (00:13 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/settings.c

index 1361a10ed255fee68ed2a7f239d26a07958d7702..42bb5e53f88f3fae23a0b6cbd76bba9ab6ad18f3 100644 (file)
@@ -331,6 +331,7 @@ struct settings * autovivify_child_settings ( struct settings *parent,
                                &new_child->autovivified.refcnt );
        settings = &new_child->autovivified.generic.settings;
        register_settings ( settings, parent, new_child->name );
+       ref_put ( settings->refcnt );
        return settings;
 }