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

Submitted by:	jedgar
This commit is contained in:
rwatson 2000-12-14 01:51:39 +00:00
parent 0a7da82d71
commit 7f5f9dc1d0

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: