From patchwork Fri Jun 21 10:38:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 253178 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 431D12C0325 for ; Fri, 21 Jun 2013 20:43:17 +1000 (EST) Received: from localhost ([::1]:58109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpyoF-0002Yc-DF for incoming@patchwork.ozlabs.org; Fri, 21 Jun 2013 06:43:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upyjg-0005WK-16 for qemu-devel@nongnu.org; Fri, 21 Jun 2013 06:38:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Upyjd-0007k4-E5 for qemu-devel@nongnu.org; Fri, 21 Jun 2013 06:38:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upyjd-0007jE-6R; Fri, 21 Jun 2013 06:38:29 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5LAcSt8031522 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 21 Jun 2013 06:38:28 -0400 Received: from rincewind.home.kraxel.org (ovpn-116-29.ams2.redhat.com [10.36.116.29]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5LAcRIn024630; Fri, 21 Jun 2013 06:38:28 -0400 Received: by rincewind.home.kraxel.org (Postfix, from userid 500) id 2B9444327A; Fri, 21 Jun 2013 12:38:26 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 21 Jun 2013 12:38:25 +0200 Message-Id: <1371811105-730-14-git-send-email-kraxel@redhat.com> In-Reply-To: <1371811105-730-1-git-send-email-kraxel@redhat.com> References: <1371811105-730-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-trivial@nongnu.org, Gerd Hoffmann Subject: [Qemu-devel] [PATCH 13/13] qemu-socket: don't leak opts on error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Gerd Hoffmann --- util/qemu-sockets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c index 7776016..29a3564 100644 --- a/util/qemu-sockets.c +++ b/util/qemu-sockets.c @@ -971,7 +971,7 @@ int socket_dgram(SocketAddress *remote, SocketAddress *local, Error **errp) default: error_setg(errp, "socket type unsupported for datagram"); - return -1; + fd = -1; } qemu_opts_del(opts); return fd;