From 93364887275e064f55ad0169959b7ee6fb765eb0 Mon Sep 17 00:00:00 2001 From: Taehee Yoo Date: Mon, 6 Apr 2015 19:45:18 +0900 Subject: [PATCH] Add CONNECTION_MUTEX_UNLOCK in connection_create routine In the connection_create routine, it should unlock its mutex before returns any values. But some routines do not unlock its mutex. So I add unlock code. Change-Id: I87a864b797ab4bc9c50ab4655497ee9aecd6875d --- src/connection.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/connection.c b/src/connection.c index 92c4ff6..55cbda8 100644 --- a/src/connection.c +++ b/src/connection.c @@ -257,10 +257,12 @@ EXPORT_API int connection_create(connection_h* connection) rv = _connection_libnet_init(); if (rv == NET_ERR_ACCESS_DENIED) { CONNECTION_LOG(CONNECTION_ERROR, "Access denied"); + CONNECTION_MUTEX_UNLOCK; return CONNECTION_ERROR_PERMISSION_DENIED; } else if (rv != NET_ERR_NONE) { CONNECTION_LOG(CONNECTION_ERROR, "Failed to create connection[%d]", rv); + CONNECTION_MUTEX_UNLOCK; return CONNECTION_ERROR_OPERATION_FAILED; } -- 2.7.4