diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index af1f7658d..f1e99c995 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -574,11 +574,9 @@ static ssize_t scst_local_transport_id_store(struct kobject *kobj, mutex_lock(&sess->tr_id_mutex); - if (sess->transport_id != NULL) { - kfree(sess->transport_id); - sess->transport_id = NULL; - sess->transport_id_len = 0; - } + kfree(sess->transport_id); + sess->transport_id = NULL; + sess->transport_id_len = 0; if (size == 0) goto out_res;