Message ID | 20110712.213817.1045173784079879730.yamato@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/support/nfs/exports.c b/support/nfs/exports.c index c250383..744c01b 100644 --- a/support/nfs/exports.c +++ b/support/nfs/exports.c @@ -784,9 +784,10 @@ struct export_features *get_export_features(void) fd = open(path, O_RDONLY); if (fd == -1) goto good; - fd = read(fd, buf, 50); - if (fd == -1) + c = read(fd, buf, 50); + if (c == -1) goto err; + close(fd); c = sscanf(buf, "%x %x", &ef.flags, &ef.secinfo_flags); if (c != 2) goto err;