From 30a1f354b9a531cdb8f4a0d096ebc00ba41248d3 Mon Sep 17 00:00:00 2001 From: hailfinger Date: Fri, 5 Jun 2009 17:04:37 +0000 Subject: Fix a bug in dummyflasher.c special case where no type parameter is given. Signed-off-by: Carl-Daniel Hailfinger Acked-by: Uwe Hermann git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@577 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- dummyflasher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dummyflasher.c') diff --git a/dummyflasher.c b/dummyflasher.c index f64691d..784cc55 100644 --- a/dummyflasher.c +++ b/dummyflasher.c @@ -35,7 +35,7 @@ int dummy_init(void) 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; } -- cgit v1.2.1