MCEUSB memory leak and how to tell if ir_register_input() failure registered input_dev?

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

 



Jarrod,

Looking at the patches branch from your WIP git tree:

Is mceusb_init_input_dev() supposed to allocate a struct ir_input_dev?
It looks like ir_register_input() handles that, and it is trashing your
pointer (memory leak).

Mauro and Jarrod,

When ir_register_input() fails, it doesn't indicate whether or not it
was able to register the input_dev or not.  To me it looks like it can
return with failure with the input_dev either way depending on the case.
This makes proper cleanup of the input_dev in my cx23885_input_init()
function difficult in the failure case, since the input subsystem has
two different deallocators depending on if the device had been
registered or not.

Regards,
Andy


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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux