diff options
author | dim <dim@FreeBSD.org> | 2010-12-09 22:01:15 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2010-12-09 22:01:15 +0000 |
commit | a3786f65f1e2fa3a4e925fdb4b2b5544b9021bf9 (patch) | |
tree | 5f0a24f71baa3176c75a20a51a9e20a22c75426c /usr.sbin/extattrctl/extattrctl.c | |
parent | ad01c620333d05c430d583ee40647e396be1ab91 (diff) | |
parent | 12dd9eb8e940c48f9fc30dbc137071b4fe5caead (diff) | |
download | FreeBSD-src-a3786f65f1e2fa3a4e925fdb4b2b5544b9021bf9.zip FreeBSD-src-a3786f65f1e2fa3a4e925fdb4b2b5544b9021bf9.tar.gz |
Sync: merge r216133 through r216338 from ^/head.
Diffstat (limited to 'usr.sbin/extattrctl/extattrctl.c')
-rw-r--r-- | usr.sbin/extattrctl/extattrctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/extattrctl/extattrctl.c b/usr.sbin/extattrctl/extattrctl.c index 1929f79..377d3ba 100644 --- a/usr.sbin/extattrctl/extattrctl.c +++ b/usr.sbin/extattrctl/extattrctl.c @@ -144,9 +144,11 @@ initattr(int argc, char *argv[]) if (error == -1) { perror(argv[1]); unlink(argv[1]); + close(i); return (-1); } + close(i); return (0); } @@ -168,21 +170,25 @@ showattr(int argc, char *argv[]) i = read(fd, &uef, sizeof(uef)); if (i == -1) { perror(argv[0]); + close(fd); return (-1); } if (i != sizeof(uef)) { fprintf(stderr, "%s: invalid file header\n", argv[0]); + close(fd); return (-1); } if (uef.uef_magic != UFS_EXTATTR_MAGIC) { fprintf(stderr, "%s: bad magic\n", argv[0]); + close(fd); return (-1); } printf("%s: version %d, size %d\n", argv[0], uef.uef_version, uef.uef_size); + close(fd); return (0); } |