Diff between 318dfd091623a0902868048e723c9a4a50a7681e and 5655cb9c501a5ba2ef0131ec13116c54dcdd3c98
Changed Files
| File | Additions | Deletions | Status |
| obexd/client/session.c | +6 | -2 | modified |
Full Patch
diff --git a/obexd/client/session.c b/obexd/client/session.c
index 0fa8efc..28516b2 100644
--- a/obexd/client/session.c
+++ b/obexd/client/session.c
@@ -1017,8 +1017,10 @@ int obc_session_put(struct obc_session *session, char *buf, const char *targetna
struct obc_transfer *transfer;
const char *agent;
- if (session->obex == NULL)
+ if (session->obex == NULL) {
+ g_free(buf);
return -ENOTCONN;
+ }
agent = obc_agent_get_name(session->agent);
@@ -1026,8 +1028,10 @@ int obc_session_put(struct obc_session *session, char *buf, const char *targetna
agent, NULL,
targetname, NULL,
NULL);
- if (transfer == NULL)
+ if (transfer == NULL) {
+ g_free(buf);
return -EIO;
+ }
obc_transfer_set_buffer(transfer, buf);