From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XW1eA-0000Jq-Cw for qemu-devel@nongnu.org; Mon, 22 Sep 2014 07:19:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XW1e5-0001WW-IU for qemu-devel@nongnu.org; Mon, 22 Sep 2014 07:19:10 -0400 Date: Mon, 22 Sep 2014 14:22:09 +0300 From: "Michael S. Tsirkin" Message-ID: <20140922112209.GG14882@redhat.com> References: <1410799208-3250-1-git-send-email-afaerber@suse.de> <1410799208-3250-5-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1410799208-3250-5-git-send-email-afaerber@suse.de> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 4/4] ivshmem: Fix fd leak on error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: Bruce Rogers , Sebastian Krahmer , qemu-stable@nongnu.org, qemu-devel@nongnu.org, David Marchand , Stefan Hajnoczi , Cam Macdonell On Mon, Sep 15, 2014 at 06:40:08PM +0200, Andreas F=E4rber wrote: > Reported-by: Stefan Hajnoczi > Cc: qemu-stable@nongnu.org > Signed-off-by: Andreas F=E4rber Reviewed-by: Michael S. Tsirkin > --- > hw/misc/ivshmem.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c > index ecef82a..bf585b7 100644 > --- a/hw/misc/ivshmem.c > +++ b/hw/misc/ivshmem.c > @@ -512,6 +512,7 @@ static void ivshmem_read(void *opaque, const uint8_= t *buf, int size) > if (incoming_fd =3D=3D -1) { > fprintf(stderr, "could not allocate file descriptor %s\n", > strerror(e= rrno)); > + close(tmp_fd); > return; > } > =20 > --=20 > 1.8.4.5