From: Justin Pettit Date: Tue, 22 Feb 2011 00:27:22 +0000 (-0800) Subject: daemon: Fix leak of string in make_pidfile(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c1b8fc2e514344a55789d6ac9909ce904137578;p=openvswitch daemon: Fix leak of string in make_pidfile(). Coverity #10724 --- diff --git a/lib/daemon.c b/lib/daemon.c index a8b3fae3..2f6f0819 100644 --- a/lib/daemon.c +++ b/lib/daemon.c @@ -223,11 +223,11 @@ make_pidfile(void) pidfile, strerror(errno)); } } - free(text); } else { VLOG_ERR("%s: write failed: %s", tmpfile, strerror(errno)); close(fd); } + free(text); } else { VLOG_ERR("%s: fcntl failed: %s", tmpfile, strerror(errno)); close(fd);