summaryrefslogtreecommitdiffstats
path: root/usr.sbin/extattrctl
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2000-12-14 01:51:39 +0000
committerrwatson <rwatson@FreeBSD.org>2000-12-14 01:51:39 +0000
commit7f5f9dc1d02d71af5d553e8d56897eb80cc50dde (patch)
tree4a4762a7e652682073d9541140dc8939f0c62b68 /usr.sbin/extattrctl
parent0a7da82d71375b143343e7c9ac591b568bc8dfdd (diff)
downloadFreeBSD-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.c5
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:
OpenPOWER on IntegriCloud