Received: from eggs.gnu.org ([2001:4830:134:3::10]:46320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtRih-0004FV-36 for qemu-devel@nongnu.org; Tue, 25 Nov 2014 20:48:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XtRia-0004Wm-Vs for qemu-devel@nongnu.org; Tue, 25 Nov 2014 20:48:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtRia-0004Wd-OX for qemu-devel@nongnu.org; Tue, 25 Nov 2014 20:48:32 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sAQ1mVgc004406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 25 Nov 2014 20:48:31 -0500 Date: Wed, 26 Nov 2014 09:48:55 +0800 From: Fam Zheng Message-ID: <20141126014855.GA2184@fam-t430.nay.redhat.com> References: <1416902879-17422-1-git-send-email-famz@redhat.com> <1416902879-17422-4-git-send-email-famz@redhat.com> <20141125133807.GI21126@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141125133807.GI21126@stefanha-thinkpad.redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.3 3/5] poll: Add epoll implementation for qemu_poll List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Paolo Bonzini , qemu-devel@nongnu.org On Tue, 11/25 13:38, Stefan Hajnoczi wrote: > On Tue, Nov 25, 2014 at 04:07:57PM +0800, Fam Zheng wrote: > > +QEMUPoll *qemu_poll_new(void) > > +{ > > + int epollfd; > > + QEMUPoll *qpoll = g_new0(QEMUPoll, 1); > > + epollfd = epoll_create1(EPOLL_CLOEXEC); > > + if (epollfd < 0) { > > + perror("epoll_create1:"); > > + abort(); > > + } > > + qpoll->epollfd = epollfd; > > + qpoll->max_events = 1; > > + g_free(qpoll->events); > > What is the point of this g_free() call? Bad rebase, I guess. Dropping. Fam