summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSungbae Yoo <sungbae.yoo@samsung.com>2018-03-05 17:07:30 +0900
committerSungbae Yoo <sungbae.yoo@samsung.com>2018-03-05 17:08:59 +0900
commitbc91c637631a97b637517279ae0306f9d8db5160 (patch)
tree82a73ba3693d86d9e17e8eeddf0c28a6facb3ba4
parent684c188048de5552b5a12231f26409c7a620a61e (diff)
downloadlibkrate-bc91c637631a97b637517279ae0306f9d8db5160.tar.gz
libkrate-bc91c637631a97b637517279ae0306f9d8db5160.tar.bz2
libkrate-bc91c637631a97b637517279ae0306f9d8db5160.zip
Fix a bug that return wrong handle when client connection is failedsubmit/tizen/20180320.042651accepted/tizen/unified/20180320.141323
Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com> Change-Id: I70e3617cbc0056123f447593a7a70f2d863245b5
-rw-r--r--lib/krate/krate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/krate/krate.cpp b/lib/krate/krate.cpp
index 6f428f3..e23331d 100644
--- a/lib/krate/krate.cpp
+++ b/lib/krate/krate.cpp
@@ -34,11 +34,11 @@ int krate_manager_create(krate_manager_h* handle)
KrateContext* client = new(std::nothrow) KrateContext();
- RET_ON_FAILURE(handle, KRATE_ERROR_CONNECTION_REFUSED);
+ RET_ON_FAILURE(client, KRATE_ERROR_CONNECTION_REFUSED);
if (client->connect() < 0) {
delete client;
- RET_ON_FAILURE(handle, KRATE_ERROR_CONNECTION_REFUSED);
+ return KRATE_ERROR_CONNECTION_REFUSED;
}
*handle = reinterpret_cast<krate_manager_h>(client);