From 9212e72c52480a1c04d49d75aebc9a102f33d2aa Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Tue, 11 Feb 2014 14:34:13 +0100 Subject: [PATCH] miraclectl: fix crash during shutdown and scan-stop Fix a NULL deref during shutdown if we try to stop a non-existant scan. Signed-off-by: David Herrmann --- src/miraclectl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miraclectl.c b/src/miraclectl.c index 94789dc..eb5f5f5 100644 --- a/src/miraclectl.c +++ b/src/miraclectl.c @@ -1635,7 +1635,7 @@ static int filters_object_fn(sd_bus *bus, if (r < 0) return r; } else { - if (!strcmp(link, scan_link)) + if (scan_link && !strcmp(link, scan_link)) cmd_scan_stop(true); cli_printf("[" CLI_YELLOW "REMOVE" CLI_DEFAULT "] Link: %s\n",