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