diff options
author | rwatson <rwatson@FreeBSD.org> | 2000-12-14 01:51:39 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2000-12-14 01:51:39 +0000 |
commit | 7f5f9dc1d02d71af5d553e8d56897eb80cc50dde (patch) | |
tree | 4a4762a7e652682073d9541140dc8939f0c62b68 /usr.sbin/extattrctl | |
parent | 0a7da82d71375b143343e7c9ac591b568bc8dfdd (diff) | |
download | FreeBSD-src-7f5f9dc1d02d71af5d553e8d56897eb80cc50dde.zip FreeBSD-src-7f5f9dc1d02d71af5d553e8d56897eb80cc50dde.tar.gz |
o Check return of strdup() for NULL, abort if so.
Submitted by: jedgar
Diffstat (limited to 'usr.sbin/extattrctl')
-rw-r--r-- | usr.sbin/extattrctl/extattrctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/extattrctl/extattrctl.c b/usr.sbin/extattrctl/extattrctl.c index 7802687..c05ec95 100644 --- a/usr.sbin/extattrctl/extattrctl.c +++ b/usr.sbin/extattrctl/extattrctl.c @@ -91,7 +91,10 @@ initattr(int argc, char *argv[]) overwrite = 1; break; case 'p': - fs_path = strdup(optarg); + if ((fs_path = strdup(optarg)) == NULL) { + perror("strdup"); + return(-1); + } break; case '?': default: |