diff options
author | jusung son <jusung07.son@samsung.com> | 2016-10-12 14:47:14 +0900 |
---|---|---|
committer | jusung son <jusung07.son@samsung.com> | 2016-10-12 14:47:14 +0900 |
commit | a332cb9382931276a85605442fd33b4d7ec3c2c5 (patch) | |
tree | 74d22079b2f849f52ec88a5e8f84cb60bf9a3282 | |
parent | 28277bb42ffd391963533f64887fea293b862c27 (diff) | |
download | message-port-a332cb9382931276a85605442fd33b4d7ec3c2c5.tar.gz message-port-a332cb9382931276a85605442fd33b4d7ec3c2c5.tar.bz2 message-port-a332cb9382931276a85605442fd33b4d7ec3c2c5.zip |
Fix memory leak
Change-Id: Ie029d2461a4e5826874791e7238c02de70e15701
Signed-off-by: jusung son <jusung07.son@samsung.com>
-rwxr-xr-x | src/message-port.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/message-port.c b/src/message-port.c index 4d9e68c..17c4943 100755 --- a/src/message-port.c +++ b/src/message-port.c @@ -272,6 +272,8 @@ static bool __is_preloaded(const char *local_appid, const char *remote_appid) pkgmgrinfo_appinfo_destroy_appinfo(handle); return false; } + pkgmgrinfo_appinfo_destroy_appinfo(handle); + ret = pkgmgrinfo_appinfo_get_usr_appinfo(remote_appid, getuid(), &handle); if (ret != PMINFO_R_OK) { _LOGE("Failed to get the appinfo. %d", ret); @@ -1176,6 +1178,7 @@ int __register_dbus_interface(const char *port_name, bool is_trusted) &error); if (error) { _LOGE("RequestName fail : %s", error->message); + g_error_free(error); goto out; } if (result == NULL) { @@ -1477,6 +1480,8 @@ static int __message_port_send_message(const char *remote_appid, const char *rem _LOGE("g_unix_fd_list_append [%s]", err->message); ret = MESSAGEPORT_ERROR_IO_ERROR; g_error_free(err); + close(sock_pair[SOCK_PAIR_SENDER]); + close(sock_pair[SOCK_PAIR_RECEIVER]); goto out; } port_info->send_sock_fd = sock_pair[SOCK_PAIR_SENDER]; |