o Check return of strdup() for NULL, abort if so.

Submitted by:	jedgar
This commit is contained in:
Robert Watson 2000-12-14 01:51:39 +00:00
parent ff93e72c08
commit 58ef75f022
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70003

View File

@ -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: