ho: Set the conn to NULL before calling lchan_release
In case we fail to activate the lchan set the connection to
NULL before calling the lchan release function.
diff --git a/openbsc/src/handover_logic.c b/openbsc/src/handover_logic.c
index bc9d68e..2cef2c4 100644
--- a/openbsc/src/handover_logic.c
+++ b/openbsc/src/handover_logic.c
@@ -137,6 +137,7 @@
if (rc < 0) {
LOGP(DHO, LOGL_ERROR, "could not activate channel\n");
new_lchan->conn->ho_lchan = NULL;
+ new_lchan->conn = NULL;
talloc_free(ho);
lchan_free(new_lchan);
return rc;