mirror of git://git.suckless.org/sbase
Check strdup() for failure
This commit is contained in:
parent
6ef8c718e1
commit
861e16ac17
2
umount.c
2
umount.c
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue