From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PULL 0/19] xen-2015-09-08-tag Date: Mon, 14 Sep 2015 11:57:44 +0200 Message-ID: <55F69A18.20709@redhat.com> References: <55F0DB30.6070607@intel.com> <55F14E20.6070805@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Stefano Stabellini Cc: Peter Maydell , "Chen, Tiejun" , "xen-devel@lists.xensource.com Devel" , QEMU Developers , mst@redhat.com List-Id: xen-devel@lists.xenproject.org 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