Fix a bug in dummyflasher.c special case where no type parameter is
given.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://coreboot.org/flashrom/trunk@577 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
diff --git a/dummyflasher.c b/dummyflasher.c
index f64691d..784cc55 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -35,7 +35,7 @@
printf_debug("%s\n", __func__);
/* "all" is equivalent to specifying no type. */
- if (!strcmp(dummytype, "all")) {
+ if (dummytype && (!strcmp(dummytype, "all"))) {
free(dummytype);
dummytype = NULL;
}