aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas@t-8ch.de>2023-12-24 13:05:20 +0100
committerThomas Weißschuh <thomas@t-8ch.de>2023-12-31 13:06:02 +0100
commit2f43ebcda0ba8bea82ae65040cea76305077dbab (patch)
treefc214127dd34f22e55c5eebb18ebc96074c87b2f
parent28a77504155987c3348516440d8d06a91fe77228 (diff)
downloadutil-linux-2f43ebcda0ba8bea82ae65040cea76305077dbab.tar.gz
libmount: (tests) fix --filesystems crash on invalid argument
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
-rw-r--r--libmount/src/utils.c2
1 files changed, 1 insertions, 1 deletions
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);