]> git.ozlabs.org Git - petitboot/blobdiff - discover/yaboot-parser.c
Various fixups and checks to make scan-build happy
[petitboot] / discover / yaboot-parser.c
index b06248f535f35eb0c05b3e2bf2437a1516cafbdf..d0a40b1b4fd14d16e628751b78db1e12c85b9598 100644 (file)
@@ -213,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);
 
@@ -235,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);