Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Anupam Roy <anupam.r@samsung.com>
Cc: vinicius.gomes@intel.com, linux-bluetooth@vger.kernel.org,
	sachin.dev@samsung.com
Subject: Re: [PATCH RESEND] tools/obex-client-tool.c: Fix memory leak in obex-client-tool
Date: Mon, 27 Jul 2015 10:22:38 +0300	[thread overview]
Message-ID: <20150727072238.GB29130@t440s> (raw)
In-Reply-To: <1437750106-16261-1-git-send-email-anupam.r@samsung.com>

Hi Anupam,

On Fri, Jul 24, 2015, Anupam Roy wrote:
> GOptionContext object should be freed in case socket connection
> fails and program execution is terminated.
> 
> ==12968== HEAP SUMMARY:
> ==12968==     in use at exit: 2,895 bytes in 14 blocks
> ==12968==   total heap usage: 23 allocs, 9 frees, 36,669 bytes allocated
> ==12968==
> ==12968== 624 (88 direct, 536 indirect) bytes in 1 blocks are definitely lost in loss record 13 of 14
> ==12968==    at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==12968==    by 0x4E85668: g_malloc0 (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
> ==12968==    by 0x4E89D22: g_option_context_new (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
> ==12968==    by 0x402BAB: main (obex-client-tool.c:428)
> ==12968==
> ==12968== LEAK SUMMARY:
> ==12968==    definitely lost: 88 bytes in 1 blocks
> ==12968==    indirectly lost: 536 bytes in 2 blocks
> ==12968==      possibly lost: 0 bytes in 0 blocks
> ==12968==    still reachable: 2,271 bytes in 11 blocks
> ==12968==         suppressed: 0 bytes in 0 blocks
> ---
>  tools/obex-client-tool.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

Applied. Thanks.

Johan

      reply	other threads:[~2015-07-27  7:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-24 15:01 [PATCH RESEND] tools/obex-client-tool.c: Fix memory leak in obex-client-tool Anupam Roy
2015-07-27  7:22 ` Johan Hedberg [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150727072238.GB29130@t440s \
    --to=johan.hedberg@gmail.com \
    --cc=anupam.r@samsung.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=sachin.dev@samsung.com \
    --cc=vinicius.gomes@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox