]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: gadgetfs: Fix a potential memory leak in 'dev_config()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 21 Feb 2017 21:33:11 +0000 (22:33 +0100)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 6 Mar 2017 14:54:45 +0000 (16:54 +0200)
commitb6e7aeeaf235901c42ec35de4633c7c69501d303
treee5c1930d7726d79e10759d3c52351e168a161609
parent4242820277b5378c9e4064e79306f326d731472f
USB: gadgetfs: Fix a potential memory leak in 'dev_config()'

'kbuf' is allocated just a few lines above using 'memdup_user()'.
If the 'if (dev->buf)' test fails, this memory is never released.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/legacy/inode.c