Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > f40fbadd80e1415ed334e1a7a6997e95 > files > 4

nut-2.4.3-5.fc13.src.rpm

~/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);