From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCQRv-0008Ll-2D for qemu-devel@nongnu.org; Fri, 14 Sep 2012 03:36:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCQRp-0001ri-3p for qemu-devel@nongnu.org; Fri, 14 Sep 2012 03:36:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCQRo-0001rd-Rd for qemu-devel@nongnu.org; Fri, 14 Sep 2012 03:36:21 -0400 Date: Fri, 14 Sep 2012 10:37:47 +0300 From: "Michael S. Tsirkin" Message-ID: <20120914073747.GG7916@redhat.com> References: <1347448378-23915-1-git-send-email-owasserm@redhat.com> <1347448378-23915-2-git-send-email-owasserm@redhat.com> <87zk4ugkwg.fsf@blackfin.pond.sub.org> <50520F53.5000903@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50520F53.5000903@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 1/3] Refactor inet_connect_opts function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Orit Wasserman Cc: kwolf@redhat.com, aliguori@us.ibm.com, akong@redhat.com, quintela@redhat.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, Markus Armbruster , pbonzini@redhat.com, lcapitulino@redhat.com On Thu, Sep 13, 2012 at 07:52:35PM +0300, Orit Wasserman wrote: > >> + for (e = res; e != NULL; e = e->ai_next) { > >> + sock = inet_connect_addr(e, block, in_progress, errp); > >> + if (in_progress && *in_progress) { > >> + return sock; > > > > Doesn't this leak res? > Actually it doesn't after patch 3 wait_for_connect is the one freeing res. > is it OK to leave it as is ? > > Orit We can't avoid breaking bisect sometimes but let's not do this intentionally. -- MST