Signed-off-by: David Disseldorp <ddiss@xxxxxxx> --- drivers/target/iscsi/iscsi_target.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c index 9ed1eb9..9dd5472 100644 --- a/drivers/target/iscsi/iscsi_target.c +++ b/drivers/target/iscsi/iscsi_target.c @@ -455,8 +455,11 @@ int iscsit_reset_np_thread( static void iscsit_free_np(struct iscsi_np *np) { - if (np->np_socket) - sock_release(np->np_socket); + if (!np->np_socket) + return; + + sock_release(np->np_socket); + np->np_socket = NULL; } int iscsit_del_np(struct iscsi_np *np) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html