core/mount: fstype may be NULL

This commit is contained in:
Yu Watanabe
2017-11-12 14:27:25 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 17b6f896b4
commit 74b1731c75
+1 -1
View File
@@ -494,7 +494,7 @@ static int mount_add_default_dependencies(Mount *m) {
return r;
/* If this is a tmpfs mount then we have to unmount it before we try to deactivate swaps */
if (streq(p->fstype, "tmpfs")) {
if (streq_ptr(p->fstype, "tmpfs")) {
r = unit_add_dependency_by_name(UNIT(m), UNIT_AFTER, SPECIAL_SWAP_TARGET, NULL, true, mask);
if (r < 0)
return r;