X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fnfs%2Fexports.c;fp=support%2Fnfs%2Fexports.c;h=c96500fdc73a0e09914edf6f4211703d1d84a539;hp=c250383a1b2fe2ada93bc5c8bf172fc02e3ad49b;hb=4cbf492fba6656c245c537e50379f80f4e66d0e7;hpb=e33658341a9c77abe69c011ccc6f65c774dae454 diff --git a/support/nfs/exports.c b/support/nfs/exports.c index c250383..c96500f 100644 --- a/support/nfs/exports.c +++ b/support/nfs/exports.c @@ -784,8 +784,9 @@ 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); + close(fd); + if (c == -1) goto err; c = sscanf(buf, "%x %x", &ef.flags, &ef.secinfo_flags); if (c != 2)