diff options
Diffstat (limited to 'libmount/src/context.c')
-rw-r--r-- | libmount/src/context.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmount/src/context.c b/libmount/src/context.c index 35c2f04b0..6a282910d 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -2334,11 +2334,11 @@ int test_mountall(struct libmnt_test *ts, int argc, char *argv[]) return -ENOMEM; if (argc > 2) { - if (!strcmp(argv[idx], "-O")) { + if (argv[idx] && !strcmp(argv[idx], "-O")) { mnt_context_set_options_pattern(cxt, argv[idx + 1]); idx += 2; } - if (!strcmp(argv[idx], "-t")) { + if (argv[idx] && !strcmp(argv[idx], "-t")) { mnt_context_set_fstype_pattern(cxt, argv[idx + 1]); idx += 2; } |