From 75c66c8c3c46e92bb3b70d9262f18248ae9ce73c Mon Sep 17 00:00:00 2001 Message-Id: <75c66c8c3c46e92bb3b70d9262f18248ae9ce73c.1367947969.git.minovotn@redhat.com> In-Reply-To: <707b9b97153063374d2530e72c49b1499fc21af9.1367947969.git.minovotn@redhat.com> References: <707b9b97153063374d2530e72c49b1499fc21af9.1367947969.git.minovotn@redhat.com> From: Michal Novotny Date: Tue, 7 May 2013 18:38:33 +0200 Subject: [PATCH 054/114] Revert "qemu-ga: don't leak a file descriptor upon failed lockf" This reverts commit a5625dd812bb8d1a83904bddcef1d4eaba49d0a8. Reverting as asked by Laszlo in message <51892739.2030807@redhat.com> because of the ordering issue (most likely) related to supersed testing. Signed-off-by: Michal Novotny --- qemu-ga.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/qemu-ga.c b/qemu-ga.c index 366f958..919170f 100644 --- a/qemu-ga.c +++ b/qemu-ga.c @@ -247,9 +247,6 @@ static bool ga_open_pidfile(const char *pidfile) pidfd = open(pidfile, O_CREAT|O_WRONLY, S_IRUSR|S_IWUSR); if (pidfd == -1 || lockf(pidfd, F_TLOCK, 0)) { g_critical("Cannot lock pid file, %s", strerror(errno)); - if (pidfd != -1) { - close(pidfd); - } return false; } -- 1.7.11.7