summaryrefslogtreecommitdiff
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-06-04 15:39:49 +0200
committerDaniel Mack <daniel@zonque.org>2015-06-04 19:00:46 +0200
commitc0a7f8d3cb757cf750fc6788df0d215f6457c09d (patch)
tree65d7fca06e649f8a33a758b94a5839d55ecb9c3e /src/core/mount.c
parent1cf548925de9c6d12200f491963b977c9db538e3 (diff)
core/mount: skip incomplete mountinfo entries
Skip /proc/mountinfo entries for which libmount returns a NULL pointer for 'source' or 'target'. This happened on Semaphore CI's build servers when the test suite is run.
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index ba1dcf1e85..851b41351e 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1522,6 +1522,9 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
options = mnt_fs_get_options(fs);
fstype = mnt_fs_get_fstype(fs);
+ if (!device || !path)
+ continue;
+
if (cunescape(device, UNESCAPE_RELAX, &d) < 0)
return log_oom();