]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: gracefully handle NULL path in mnt_resolve_target()
authorThomas Weißschuh <thomas@t-8ch.de>
Fri, 22 Sep 2023 09:30:57 +0000 (11:30 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Fri, 22 Sep 2023 18:30:12 +0000 (20:30 +0200)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
libmount/src/cache.c

index 2505919c99c135719531adf95addae6bd0be141e..6286aeb9edd954b2e026af803033a4033c7c898e 100644 (file)
@@ -588,6 +588,9 @@ char *mnt_resolve_target(const char *path, struct libmnt_cache *cache)
 {
        char *p = NULL;
 
+       if (!path)
+               return NULL;
+
        /*DBG(CACHE, ul_debugobj(cache, "resolving target %s", path));*/
 
        if (!cache || !cache->mountinfo)