CONNECT: connect data is not always malloc()ed so we can demand it is free()able
After a sync connection, make sure to clear connect_data since it will otherwise point to a structure on the stack.
This commit is contained in:
@@ -97,6 +97,9 @@ iscsi_connect_sync(struct iscsi_context *iscsi, const char *portal)
|
||||
|
||||
event_loop(iscsi, &state);
|
||||
|
||||
/* clear connect_data so it doesnt point to our stack */
|
||||
iscsi->connect_data = NULL;
|
||||
|
||||
return state.status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user