mirror of https://github.com/xqemu/xqemu.git
block/vvfat: Plug memory leak in read_directory()
Has always been leaky. Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
6262bbd363
commit
b122c3b6d0
|
@ -787,7 +787,9 @@ static int read_directory(BDRVVVFATState* s, int mapping_index)
|
||||||
s->current_mapping->path=buffer;
|
s->current_mapping->path=buffer;
|
||||||
s->current_mapping->read_only =
|
s->current_mapping->read_only =
|
||||||
(st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) == 0;
|
(st.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) == 0;
|
||||||
}
|
} else {
|
||||||
|
g_free(buffer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue