X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gtest%2Fvpn.cpp;h=fe5705097690a42dfe54067289a6d928ba33f4ec;hb=ac5fe1caa1a1a07fd703860788784015b23f7000;hp=ec42fbaf22477a0e22cf6e0755b5812eb6b06d11;hpb=a6adc453779d7740d65fa41ada4fe5faec9f519f;p=platform%2Fcore%2Fconnectivity%2Fnet-config.git diff --git a/gtest/vpn.cpp b/gtest/vpn.cpp index ec42fba..fe57050 100755 --- a/gtest/vpn.cpp +++ b/gtest/vpn.cpp @@ -53,12 +53,14 @@ error_e Vpnsvc::vpn_init(const char *iface_name, int iface_name_len, int *result if ((iface_fd = open("/dev/net/tun", O_RDWR)) < 0) { GLOGD("tun device open fail\n"); + g_object_unref(fd_list); return ERROR_OPERATION_FAILED; } g_unix_fd_list_append(fd_list, iface_fd, &g_error); if (g_error != NULL) { close(iface_fd); + g_object_unref(fd_list); return ERROR_OPERATION_FAILED; } @@ -73,12 +75,14 @@ error_e Vpnsvc::vpn_init(const char *iface_name, int iface_name_len, int *result if (message == NULL) { GLOGD("Failed to invoke dbus method"); close(iface_fd); + g_object_unref(fd_list); return error; } g_variant_get(message, "(iis)", result, h_index, h_name); g_variant_unref(message); close(iface_fd); + g_object_unref(fd_list); return ERROR_NONE; }