summaryrefslogtreecommitdiff
path: root/obexd/client
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2014-08-01 14:26:10 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2014-08-04 09:10:55 +0300
commit68fc5cb2bd68a1b116fc9404887784114592704c (patch)
tree40edbac802b66f7f552be5517d0f821b5ff6325c /obexd/client
parentf25df405f2e7f883c500d078767c97a73725a656 (diff)
downloadbluez-68fc5cb2bd68a1b116fc9404887784114592704c.tar.gz
obexd: Fix memory leak
Fixes memory leak for folder_listing_cb().
Diffstat (limited to 'obexd/client')
-rw-r--r--obexd/client/map.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/obexd/client/map.c b/obexd/client/map.c
index d2d3d81a7..0ef5e0f65 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -271,8 +271,10 @@ static void folder_listing_cb(struct obc_session *session,
}
reply = dbus_message_new_method_return(request->msg);
- if (reply == NULL)
- return;
+ if (reply == NULL) {
+ g_free(contents);
+ goto clean;
+ }
dbus_message_iter_init_append(reply, &iter);
dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
@@ -288,6 +290,7 @@ static void folder_listing_cb(struct obc_session *session,
done:
g_dbus_send_message(conn, reply);
+clean:
pending_request_free(request);
}