linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] obexd: client: Fix memory leaks
@ 2016-02-03 14:22 Syam Sidhardhan
  0 siblings, 0 replies; 3+ messages in thread
From: Syam Sidhardhan @ 2016-02-03 14:22 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: syamsidhardh, Syam Sidhardhan

We have to free the allocated memory for data and its members.
---
 obexd/client/session.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/obexd/client/session.c b/obexd/client/session.c
index ef998f9..5f981bf 100644
--- a/obexd/client/session.c
+++ b/obexd/client/session.c
@@ -1179,6 +1179,7 @@ guint obc_session_setpath(struct obc_session *session, const char *path,
 	if (!data->remaining || !data->remaining[0]) {
 		error("obc_session_setpath: invalid path %s", path);
 		g_set_error(err, OBEX_IO_ERROR, -EINVAL, "Invalid argument");
+		setpath_data_free(data);
 		return 0;
 	}
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] obexd: client: Fix memory leaks
@ 2016-02-08 14:59 SYAM SIDHARDHAN
  2016-02-11 14:13 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: SYAM SIDHARDHAN @ 2016-02-08 14:59 UTC (permalink / raw)
  To: linux-bluetooth@vger.kernel.org; +Cc: syamsidhardh@gmail.com

DQpIaSwNCi0tLS0tLS0gT3JpZ2luYWwgTWVzc2FnZSAtLS0tLS0tDQpTZW5kZXIgOiBTWUFNIFNJ
REhBUkRIQU48cy5zeWFtQHNhbXN1bmcuY29tPiAuL1NlbmlvciBDaGllZiBFbmdpbmVlci9TUkkt
QmFuZ2Fsb3JlLVN5c3RlbSAmIENvbm5lY3Rpdml0eS9TYW1zdW5nIEVsZWN0cm9uaWNzDQpEYXRl
IDogRmViIDAzLCAyMDE2IDE5OjUyIChHTVQrMDU6MzApDQpUaXRsZSA6IFtQQVRDSCAxLzFdIG9i
ZXhkOiBjbGllbnQ6IEZpeCBtZW1vcnkgbGVha3MNCg0KV2UgaGF2ZSB0byBmcmVlIHRoZSBhbGxv
Y2F0ZWQgbWVtb3J5IGZvciBkYXRhIGFuZCBpdHMgbWVtYmVycy4NCi0tLQ0Kb2JleGQvY2xpZW50
L3Nlc3Npb24uYyB8ICAgIDEgKw0KMSBmaWxlIGNoYW5nZWQsIDEgaW5zZXJ0aW9uKCspDQoNCmRp
ZmYgLS1naXQgYS9vYmV4ZC9jbGllbnQvc2Vzc2lvbi5jIGIvb2JleGQvY2xpZW50L3Nlc3Npb24u
Yw0KaW5kZXggZWY5OThmOS4uNWY5ODFiZiAxMDA2NDQNCi0tLSBhL29iZXhkL2NsaWVudC9zZXNz
aW9uLmMNCisrKyBiL29iZXhkL2NsaWVudC9zZXNzaW9uLmMNCkBAIC0xMTc5LDYgKzExNzksNyBA
QCBndWludCBvYmNfc2Vzc2lvbl9zZXRwYXRoKHN0cnVjdCBvYmNfc2Vzc2lvbiAqc2Vzc2lvbiwg
Y29uc3QgY2hhciAqcGF0aCwNCmlmICghZGF0YS0+cmVtYWluaW5nIHx8ICFkYXRhLT5yZW1haW5p
bmdbMF0pIHsNCmVycm9yKCJvYmNfc2Vzc2lvbl9zZXRwYXRoOiBpbnZhbGlkIHBhdGggJXMiLCBw
YXRoKTsNCmdfc2V0X2Vycm9yKGVyciwgT0JFWF9JT19FUlJPUiwgLUVJTlZBTCwgIkludmFsaWQg
YXJndW1lbnQiKTsNCisgc2V0cGF0aF9kYXRhX2ZyZWUoZGF0YSk7DQpyZXR1cm4gMDsNCn0NCg0K
cGluZw==



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] obexd: client: Fix memory leaks
  2016-02-08 14:59 [PATCH 1/1] obexd: client: Fix memory leaks SYAM SIDHARDHAN
@ 2016-02-11 14:13 ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2016-02-11 14:13 UTC (permalink / raw)
  To: Syam Sidhardhan; +Cc: linux-bluetooth@vger.kernel.org, syamsidhardh@gmail.com

Hi Syam,

On Mon, Feb 8, 2016 at 4:59 PM, SYAM SIDHARDHAN <s.syam@samsung.com> wrote:
>
> Hi,
> ------- Original Message -------
> Sender : SYAM SIDHARDHAN<s.syam@samsung.com> ./Senior Chief Engineer/SRI-Bangalore-System & Connectivity/Samsung Electronics
> Date : Feb 03, 2016 19:52 (GMT+05:30)
> Title : [PATCH 1/1] obexd: client: Fix memory leaks
>
> We have to free the allocated memory for data and its members.
> ---
> obexd/client/session.c |    1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/obexd/client/session.c b/obexd/client/session.c
> index ef998f9..5f981bf 100644
> --- a/obexd/client/session.c
> +++ b/obexd/client/session.c
> @@ -1179,6 +1179,7 @@ guint obc_session_setpath(struct obc_session *session, const char *path,
> if (!data->remaining || !data->remaining[0]) {
> error("obc_session_setpath: invalid path %s", path);
> g_set_error(err, OBEX_IO_ERROR, -EINVAL, "Invalid argument");
> + setpath_data_free(data);
> return 0;
> }

Applied, thanks.


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-11 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-08 14:59 [PATCH 1/1] obexd: client: Fix memory leaks SYAM SIDHARDHAN
2016-02-11 14:13 ` Luiz Augusto von Dentz
  -- strict thread matches above, loose matches on Subject: below --
2016-02-03 14:22 Syam Sidhardhan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).