Re: [PATCH 4/8] hog: Fix memory leak in suspend-dummy

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

 



Hi Szymon,

On Fri, Nov 30, 2012 at 7:24 AM, Szymon Janc <szymon.janc@xxxxxxxxx> wrote:
> @@ -137,9 +133,9 @@ int suspend_init(suspend_event suspend, resume_event resume)
>
>  void suspend_exit(void)
>  {
> -       if (fifoio) {
> -               g_io_channel_shutdown(fifoio, FALSE, NULL);
> -               g_io_channel_unref(fifoio);
> +       if (watch) {

By convention, we try to use "if (watch > 0)" or "if (watch == 0)"
when checking whether watches are valid. In this case, "if (watch >
0)" is more appropriate.

> +               g_source_remove(watch);
> +               watch = 0;
>         }
>
>         remove(HOG_SUSPEND_FIFO);

Regards,
-- 
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
--
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