projects
/
platform
/
core
/
connectivity
/
net-config.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Fix for CID:860243" into tizen
[platform/core/connectivity/net-config.git]
/
gtest
/
vpn.cpp
diff --git
a/gtest/vpn.cpp
b/gtest/vpn.cpp
index
ec42fba
..
fe57050
100755
(executable)
--- 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");
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);
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;
}
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);
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);
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;
}
return ERROR_NONE;
}