On Mon, 13 Jul 2015, Jason Gerecke wrote:

> The 'wacom_allocate_inputs' function tries to allocate three input
> devices: one each for the pen, touch, and pad. The pointers that are
> returned by the 'wacom_allocate_input' calls are temporarily stored
> to local variables where they are checked to ensure they're non-null
> before storing them in the 'wacom_wac' structure. If an allocation
> fails,  the 'wacom_free_inputs' function is called to reclaim the
> memory. Unfortunately, 'wacom_free_inputs' is called prior to the
> pointers being copied, so it is not actually able to free anything.
> 
> This patch has the calls to 'wacom_allocate_input' store the pointer
> directly in the 'wacom_wac' structure where they can be freed. Also,
> it replaces the call to 'wacom_free_inputs' with the (more general)
> 'wacom_clean_inputs' and removes the no-longer-used function.
> 
> Signed-off-by: Jason Gerecke <[email protected]>
> ---
> Jiri,
> 
> This patch should cleanly apply to either your 'for-4.3/wacom' or
> 'for-4.2/upstream-fixes' branch. It conflicts with 'for-4.3/upstream'
> where Markus' "Delete unnecessary checks" patch (67e123f) resides.
> I can provide a patch which applies cleanly to that branch instead
> if you would like. The conflict is due to his patch modifying the
> 'wacom_free_inputs' function; this patch removes the function
> entirely though so the conflict shouldn't be too difficult to resolve.

I resolved this and applied to for-4.3/wacom.

Thanks,

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to