IncrementalScan(): Make sure 'st' is valid before dereferencing it

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Jes Sorensen 2015-02-24 16:00:39 -05:00 committed by NeilBrown
parent 9eb5ce5ae2
commit 5d94384e93
1 changed files with 1 additions and 1 deletions

View File

@ -1354,7 +1354,7 @@ restart:
if (st && st->ss->load_container)
ret = st->ss->load_container(st, mdfd, NULL);
close(mdfd);
if (!ret && st->ss->container_content) {
if (!ret && st && st->ss->container_content) {
if (map_lock(&map))
pr_err("failed to get exclusive lock on mapfile\n");
ret = Incremental_container(st, me->path, c, only);