diff options
Diffstat (limited to 'libmount/src')
-rw-r--r-- | libmount/src/fs.c | 3 | ||||
-rw-r--r-- | libmount/src/optstr.c | 4 | ||||
-rw-r--r-- | libmount/src/tab_parse.c | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/libmount/src/fs.c b/libmount/src/fs.c index eb89bb8a3..4126ee9dc 100644 --- a/libmount/src/fs.c +++ b/libmount/src/fs.c @@ -188,9 +188,10 @@ struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest, dest = mnt_new_fs(); if (!dest) return NULL; + + dest->tab = NULL; } - dest->tab = NULL; dest->id = src->id; dest->parent = src->parent; dest->devno = src->devno; 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; } diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c index 8e94715d2..2dfa6cbb4 100644 --- a/libmount/src/tab_parse.c +++ b/libmount/src/tab_parse.c @@ -154,7 +154,7 @@ static int mnt_parse_table_line(struct libmnt_fs *fs, const char *s) if (!s || !*s) goto done; - /* (6) freq (optional) */ + /* (6) passno (optional) */ s = next_s32(s, &fs->passno, &rc); if (s && *s && rc) { DBG(TAB, ul_debug("tab parse error: [passno]")); |