diff options
author | Harald Hoyer <harald@redhat.com> | 2013-07-04 11:01:47 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2013-07-04 12:01:15 +0200 |
commit | 1e4fc9b1d8449e87474b3af8a4ddab09fab27cd5 (patch) | |
tree | ba108235f203c16176ce50d51b50462591c61452 /src | |
parent | b0adb5468cccf32da1365c2e8f97b2b233c4fa30 (diff) | |
download | systemd-1e4fc9b1d8449e87474b3af8a4ddab09fab27cd5.tar.gz |
core/mount.c:mount_dump(): don't segfault, if mount is not mounted anymore
Don't segfault, if m->from_proc_self_mountinfo and m->from_fragment is
false.
https://bugzilla.redhat.com/show_bug.cgi?id=957783#c9
Diffstat (limited to 'src')
-rw-r--r-- | src/core/mount.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/mount.c b/src/core/mount.c index 3cc3e65b23..58a3f1160f 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -822,9 +822,9 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) { prefix, mount_state_to_string(m->state), prefix, mount_result_to_string(m->result), prefix, m->where, - prefix, strna(p->what), - prefix, strna(p->fstype), - prefix, strna(p->options), + prefix, p ? strna(p->what) : "n/a", + prefix, p ? strna(p->fstype) : "n/a", + prefix, p ? strna(p->options) : "n/a", prefix, yes_no(m->from_proc_self_mountinfo), prefix, yes_no(m->from_fragment), prefix, m->directory_mode); |