Commit d49fd40e authored by Pavel Emelyanov's avatar Pavel Emelyanov

mnt: Sanitize the code of reading mnt images routine

Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 4ffa7969
......@@ -1535,29 +1535,21 @@ static struct mount_info *read_mnt_ns_img(void)
struct mount_info *pms = NULL;
struct ns_id *nsid;
nsid = ns_ids;
while (nsid) {
if (nsid->nd != &mnt_ns_desc) {
nsid = nsid->next;
for (nsid = ns_ids; nsid != NULL; nsid = nsid->next) {
if (nsid->nd != &mnt_ns_desc)
continue;
}
if (nsid->id != root_item->ids->mnt_ns_id)
if (create_mnt_roots(true))
return NULL;
if (collect_mnt_from_image(&pms, nsid))
goto err;
nsid = nsid->next;
return NULL;
}
/* Here is not matter where the mount list is saved */
/* Here it doesn't matter where the mount list is saved */
mntinfo = pms;
return pms;
err:
return NULL;
}
char *rst_get_mnt_root(int mnt_id)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment