Blob Blame Raw
~/cvsf/nut/devel ~/cvsf/nut/devel
diff -up nut-2.4.3/drivers/upsdrvctl.c.portcrash nut-2.4.3/drivers/upsdrvctl.c
--- nut-2.4.3/drivers/upsdrvctl.c.portcrash	2010-07-26 11:38:19.830941009 +0200
+++ nut-2.4.3/drivers/upsdrvctl.c	2010-07-26 11:39:32.302764246 +0200
@@ -131,7 +131,7 @@ static void stop_driver(const ups_t *ups
 		ups->driver, ups->upsname);
 	ret = stat(pidfn, &fs);
 
-	if (ret != 0) {
+	if ((ret != 0) && (ups->port != NULL)) {
 		snprintf(pidfn, sizeof(pidfn), "%s/%s-%s.pid", altpidpath(),
 			ups->driver, xbasename(ups->port));
 		ret = stat(pidfn, &fs);