svn commit: samba r10535 - in branches/SAMBA_4_0/source/lib: .

tridge at samba.org tridge at samba.org
Tue Sep 27 11:59:40 GMT 2005


Author: tridge
Date: 2005-09-27 11:59:39 +0000 (Tue, 27 Sep 2005)
New Revision: 10535

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10535

Log:

fixed the pidfile code (it didn't survive the recent pstring changes)

Modified:
   branches/SAMBA_4_0/source/lib/pidfile.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/pidfile.c
===================================================================
--- branches/SAMBA_4_0/source/lib/pidfile.c	2005-09-27 11:24:03 UTC (rev 10534)
+++ branches/SAMBA_4_0/source/lib/pidfile.c	2005-09-27 11:59:39 UTC (rev 10535)
@@ -39,9 +39,9 @@
 	asprintf(&pidFile, "%s/%s.pid", lp_piddir(), name);
 
 	fd = open(pidFile, O_NONBLOCK | O_RDONLY, 0644);
-	SAFE_FREE(pidFile);
 
 	if (fd == -1) {
+		SAFE_FREE(pidFile);
 		return 0;
 	}
 
@@ -63,11 +63,13 @@
 	}
 
 	close(fd);
+	SAFE_FREE(pidFile);
 	return (pid_t)ret;
 
  noproc:
 	close(fd);
 	unlink(pidFile);
+	SAFE_FREE(pidFile);
 	return 0;
 }
 



More information about the samba-cvs mailing list