From 2f43ebcda0ba8bea82ae65040cea76305077dbab Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Sun, 24 Dec 2023 13:05:20 +0100 Subject: [PATCH] libmount: (tests) fix --filesystems crash on invalid argument MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Weißschuh --- libmount/src/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmount/src/utils.c b/libmount/src/utils.c index b6d95696ad..056c5d4fb0 100644 --- a/libmount/src/utils.c +++ b/libmount/src/utils.c @@ -1364,7 +1364,7 @@ static int test_filesystems(struct libmnt_test *ts __attribute__((unused)), return -1; rc = mnt_get_filesystems(&filesystems, argc == 2 ? argv[1] : NULL); - if (!rc) { + if (!rc && filesystems) { char **p; for (p = filesystems; *p; p++) printf("%s\n", *p); -- 2.47.3