svn commit: samba r10536 - in branches/tmp/samba4-winsrepl: . source/lib

metze at samba.org metze at samba.org
Tue Sep 27 12:07:02 GMT 2005


Author: metze
Date: 2005-09-27 12:07:01 +0000 (Tue, 27 Sep 2005)
New Revision: 10536

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

Log:
 r12926 at SERNOX (orig r10535):  tridge | 2005-09-27 13:59:39 +0200
 
 fixed the pidfile code (it didn't survive the recent pstring changes)
 

Modified:
   branches/tmp/samba4-winsrepl/
   branches/tmp/samba4-winsrepl/source/lib/pidfile.c


Changeset:

Property changes on: branches/tmp/samba4-winsrepl
___________________________________________________________________
Name: svk:merge
   - 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:10533
3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba4:9495
a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11632
   + 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:10535
3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba4:9495
a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11632

Modified: branches/tmp/samba4-winsrepl/source/lib/pidfile.c
===================================================================
--- branches/tmp/samba4-winsrepl/source/lib/pidfile.c	2005-09-27 11:59:39 UTC (rev 10535)
+++ branches/tmp/samba4-winsrepl/source/lib/pidfile.c	2005-09-27 12:07:01 UTC (rev 10536)
@@ -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