Fix a bug in dummyflasher.c special case where no type parameter is given
Corresponding to flashrom svn r577.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
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;
}