iscsi: fix segfault in url parsing
If an invalid URL is specified iscsi_get_error(iscsi) is called with iscsi == NULL. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
03a36f17d7
commit
8da1e18b0c
@ -947,8 +947,7 @@ static int iscsi_open(BlockDriverState *bs, const char *filename, int flags)
|
|||||||
|
|
||||||
iscsi_url = iscsi_parse_full_url(iscsi, filename);
|
iscsi_url = iscsi_parse_full_url(iscsi, filename);
|
||||||
if (iscsi_url == NULL) {
|
if (iscsi_url == NULL) {
|
||||||
error_report("Failed to parse URL : %s %s", filename,
|
error_report("Failed to parse URL : %s", filename);
|
||||||
iscsi_get_error(iscsi));
|
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user