cfdisk: check mnt_table_parse_fstab() return code [coverity scan]

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2020-01-15 11:56:00 +01:00
parent f6e182078a
commit a8955bf07a
1 changed files with 4 additions and 1 deletions

View File

@ -1266,7 +1266,10 @@ static char *get_mountpoint(struct cfdisk *cf, const char *tagname, const char *
cf->fstab = mnt_new_table();
if (cf->fstab) {
mnt_table_set_cache(cf->fstab, cf->mntcache);
mnt_table_parse_fstab(cf->fstab, NULL);
if (mnt_table_parse_fstab(cf->fstab, NULL) != 0) {
mnt_unref_table(cf->fstab);
cf->fstab = NULL;
}
}
}
if (cf->fstab)