commit | 4cceff677611ce51bd639f2f00b73e0dd1f047ee | [log] [tgz] |
---|---|---|
author | Ralph Siemsen <ralph.siemsen@linaro.org> | Fri Jun 28 10:42:02 2019 -0400 |
committer | Marek Vasut <marex@denx.de> | Thu Aug 08 11:35:02 2019 +0200 |
tree | 7feab0606296d04c18801c3bce8a78af53746a06 | |
parent | c7eaa8b101e515ec0bbbd7130cf7998dd1979eba [diff] |
usb: gadget: f_dfu.c: fix memory leak dfu_prepare_function() allocates N+1 descriptor header structures, the last one being the "DFU Functional Descriptor". dfu_unbind() handles de-allocation, but fails to free the final one (eg. "DFU Functional Descriptor"), leading to memory leak. Fixed by incrementing counter, as in dfu_prepare_function(). Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org>