gtp_tunnel: Avoid double-unlock in error path of gtp_tunnel_alloc

Fixes: CID#307509: Double unlock (LOCK)
Change-Id: Ie6e4c08d2c235fbe90516c3dfe2c82963fd70a6f
diff --git a/daemon/gtp_tunnel.c b/daemon/gtp_tunnel.c
index f9075f7..87d1e69 100644
--- a/daemon/gtp_tunnel.c
+++ b/daemon/gtp_tunnel.c
@@ -28,7 +28,7 @@
 
 	t = talloc_zero(d, struct gtp_tunnel);
 	if (!t)
-		goto out_unlock;
+		goto out;
 	t->d = d;
 	t->name = talloc_asprintf(t, "%s-R%08x-T%08x", cpars->tun_name, cpars->rx_teid, cpars->tx_teid);
 	t->tun_dev = tun_device_find_or_create(d, cpars->tun_name, cpars->tun_netns_name);
@@ -72,14 +72,13 @@
 	return t;
 
 out_ep:
+	pthread_rwlock_unlock(&d->rwlock);
 	_gtp_endpoint_release(t->gtp_ep);
 out_tun:
 	_tun_device_release(t->tun_dev);
 out_free:
 	talloc_free(t);
-out_unlock:
-	pthread_rwlock_unlock(&d->rwlock);
-
+out:
 	return NULL;
 }