INIT check iscsi==NULL in iscsi_get_error()

qemu-kvm calls iscsi_get_error(NULL) if we specify an invalid URL
This commit is contained in:
Peter Lieven
2012-11-15 11:24:24 +01:00
committed by Ronnie Sahlberg
parent 6f7b02989a
commit 6f3a575238

View File

@@ -316,6 +316,7 @@ iscsi_set_log_level(struct iscsi_context *iscsi, int level)
const char *
iscsi_get_error(struct iscsi_context *iscsi)
{
if (iscsi==NULL) return "";
return iscsi->error_string;
}