Check strdup() for failure

This commit is contained in:
sin 2014-03-15 18:48:01 +00:00
parent 6ef8c718e1
commit 861e16ac17
1 changed files with 2 additions and 0 deletions

View File

@ -74,6 +74,8 @@ umountall(int flags)
if (!mntdirs) if (!mntdirs)
eprintf("realloc:"); eprintf("realloc:");
mntdirs[len - 1] = strdup(me->mnt_dir); mntdirs[len - 1] = strdup(me->mnt_dir);
if (!mntdirs[len - 1])
eprintf("strdup:");
} }
endmntent(fp); endmntent(fp);
while (--len >= 0) { while (--len >= 0) {