aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-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 78026878fecf..c05ec956b9e2 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: