From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbQWI-0003fC-Tx for qemu-devel@nongnu.org; Mon, 14 Sep 2015 05:57:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbQWD-00044V-SI for qemu-devel@nongnu.org; Mon, 14 Sep 2015 05:57:54 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:33796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbQWD-000447-Lt for qemu-devel@nongnu.org; Mon, 14 Sep 2015 05:57:49 -0400 Received: by wicfx3 with SMTP id fx3so132622085wic.1 for ; Mon, 14 Sep 2015 02:57:48 -0700 (PDT) Sender: Paolo Bonzini References: <55F0DB30.6070607@intel.com> <55F14E20.6070805@intel.com> From: Paolo Bonzini Message-ID: <55F69A18.20709@redhat.com> Date: Mon, 14 Sep 2015 11:57:44 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 0/19] xen-2015-09-08-tag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: Peter Maydell , "Chen, Tiejun" , "xen-devel@lists.xensource.com Devel" , QEMU Developers , mst@redhat.com On 10/09/2015 12:29, Stefano Stabellini wrote: > + if (lseek(config_fd, pos, SEEK_SET) != pos) { > + return -errno; > + } > do { > - rc = pread(config_fd, (uint8_t *)&val, len, pos); > + rc = read(config_fd, (uint8_t *)&val, len); > } while (rc < 0 && (errno == EINTR || errno == EAGAIN)); This leaks config_fd. Paolo