Re: [PATCH v2] shared: Fix not calling destroy callback while clearing up handlers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Szymon,

On Thu, Jan 09, 2014, Szymon Janc wrote:
> read/write_watch_destroy is be called after io_set_read/write_handler
> exits. This was resulting in io destroy callback being NULLem before
> destroy was called resulting in io destroy not being called at all.
> 
> Fix this by assigning destroy callback only if setting non-NULL
> callback. destroy_watch will clean it when called.
> 
> Fix following valgrind report:
> 
> 168 (120 direct, 48 indirect) bytes in 1 blocks are definitely lost in
>        loss record 34 of 36
>    at 0x4C2C494: calloc (in /usr/lib/valgrind/
>        vgpreload_memcheck-amd64-linux.so)
>    by 0x409BAE: mgmt_new (mgmt.c:372)
>    by 0x409D05: mgmt_new_default (mgmt.c:469)
>    by 0x40E100: test_pre_setup (android-tester.c:371)
>    by 0x40AD84: start_tester (tester.c:586)
>    by 0x4E7C3B5: g_main_context_dispatch (in /lib/x86_64-linux-gnu/
>        libglib-2.0.so.0.3800.1)
>    by 0x4E7C707: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
>    by 0x4E7CB09: g_main_loop_run (in /lib/x86_64-linux-gnu/
>        libglib-2.0.so.0.3800.1)
>    by 0x40B76C: tester_run (tester.c:784)
>    by 0x4034F4: main (android-tester.c:2127)
> ---
>  src/shared/io-glib.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied. Thanks.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux