diff options
Diffstat (limited to 'libmount/src/optstr.c')
-rw-r--r-- | libmount/src/optstr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c index c0f438fe2..49fc9cc40 100644 --- a/libmount/src/optstr.c +++ b/libmount/src/optstr.c @@ -351,7 +351,9 @@ int mnt_optstr_deduplicate_option(char **optstr, const char *name) end = ol.end; opt = end && *end ? end + 1 : NULL; } - } while (rc == 0 && opt && *opt); + if (opt == NULL) + break; + } while (rc == 0 && *opt); return rc < 0 ? rc : begin ? 0 : 1; } |