Check strdup() for failure

This commit is contained in:
sin 2014-03-15 18:48:01 +00:00
parent 6ef8c718e1
commit 861e16ac17

View File

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