diff --git a/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/lib/recovery.c b/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/lib/recovery.c index 6781b8930..d053a932c 100644 --- a/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/lib/recovery.c +++ b/meta-digi-dey/recipes-core/recovery/recovery-utils/recovery-utils/lib/recovery.c @@ -439,7 +439,7 @@ static int parse_nand_partition_info(char **parts, char **encrypted, unsigned ch /* Parse mtdparts for all partition info */ ret = uboot_getenv("mtdparts", &var); - if (ret) { + if (ret || !var) { fprintf(stderr, "Error: getenv 'mtdparts'\n"); return ret; } @@ -978,6 +978,10 @@ int is_dualboot_enabled (void) return 0; } + /* Consider dualboot not enabled if variable doesn't exist */ + if (!var) + return 0; + /* Is dualboot enabled */ if (!strcmp(var, "no")) ret = 0;