target/tcm_fc: Fix use-after-free of ft_tpg
[pandora-kernel.git] / drivers / target / tcm_fc / tfc_sess.c
index 0475142..1329726 100644 (file)
@@ -68,6 +68,7 @@ static struct ft_tport *ft_tport_create(struct fc_lport *lport)
 
        if (tport) {
                tport->tpg = tpg;
+               tpg->tport = tport;
                return tport;
        }