From: Andrzej Pietrasiewicz Date: Thu, 21 Aug 2014 14:54:45 +0000 (+0200) Subject: usb: gadget: f_uvc: fix potential memory leak X-Git-Tag: fixes-for-v3.18-merge-window~16^2~118^2~68 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e73798572e115f73066567f5840d4e5c21da70a8;p=pandora-kernel.git usb: gadget: f_uvc: fix potential memory leak If uvc->control_buf is successfuly allocated but uvc->control_req is not, uvc->control_buf is not freed in the error recovery path. With this patch applied uvc->control_buf is freed unconditionally; if it happens to be NULL kfree on it is safe anyway. Signed-off-by: Andrzej Pietrasiewicz Acked-by: Sebastian Andrzej Siewior Signed-off-by: Laurent Pinchart Signed-off-by: Felipe Balbi --- Reading git-diff-tree failed