From 9d8096baa6df0166c7f11c448064978533b83860 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 19 May 2023 17:30:03 -0700 Subject: [PATCH] libsysprof-analyze: pass-through when there are no matches --- src/libsysprof-analyze/sysprof-mount-namespace.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/libsysprof-analyze/sysprof-mount-namespace.c b/src/libsysprof-analyze/sysprof-mount-namespace.c index 47534bc7..a355c3bc 100644 --- a/src/libsysprof-analyze/sysprof-mount-namespace.c +++ b/src/libsysprof-analyze/sysprof-mount-namespace.c @@ -277,7 +277,14 @@ sysprof_mount_namespace_translate (SysprofMountNamespace *self, } if (strv->len == 0) - return NULL; + { + /* Try to passthrough the path in case we had no matches just to give + * things a chance to decode. This can happen if we never recorded + * the contents of /proc/$$/mountinfo. + */ + char *copy = g_strdup (file); + g_array_append_val (strv, copy); + } return (char **)g_array_free (g_steal_pointer (&strv), FALSE); }