X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=discover%2Fyaboot-parser.c;h=d0a40b1b4fd14d16e628751b78db1e12c85b9598;hb=cf9e0cd6f7caf7b171457f7bf9f56f23ec3e478c;hp=42db95bcfbbb1ae758b4704303baa3b3992dc5d8;hpb=5b33aaaaad68b890aacc3ddc4e47812a58d8c1e6;p=petitboot diff --git a/discover/yaboot-parser.c b/discover/yaboot-parser.c index 42db95b..d0a40b1 100644 --- a/discover/yaboot-parser.c +++ b/discover/yaboot-parser.c @@ -172,6 +172,7 @@ static void yaboot_finish(struct conf_context *conf) state->opt->option->is_default = true; discover_context_add_boot_option(conf->dc, state->opt); + state->opt = NULL; } static void yaboot_process_pair(struct conf_context *conf, const char *name, @@ -212,6 +213,8 @@ static void yaboot_process_pair(struct conf_context *conf, const char *name, /* Then start the new image. */ opt = state_start_new_option(conf, state); + if (!opt) + pb_debug_fn("new opt is NULL\n"); state->boot_image = talloc_strdup(state, value); @@ -234,6 +237,8 @@ static void yaboot_process_pair(struct conf_context *conf, const char *name, /* Then start the new image. */ opt = state_start_new_option(conf, state); + if (!opt) + pb_debug_fn("new opt is NULL\n"); if (*value == '/') { state->boot_image = talloc_strdup(state, value);