SYNC CONNECT: make sure state is non-NULL before we dereference it

This commit is contained in:
Ronnie Sahlberg
2012-08-09 08:46:29 +10:00
parent 06cc2d2ece
commit 08034c3335

View File

@@ -76,8 +76,10 @@ iscsi_sync_cb(struct iscsi_context *iscsi _U_, int status,
{
struct iscsi_sync_state *state = private_data;
state->status = status;
state->finished = 1;
if (state != NULL) {
state->status = status;
state->finished = 1;
}
}
int