Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx> --- scripts/imx/imx-usb-loader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/imx/imx-usb-loader.c b/scripts/imx/imx-usb-loader.c index 12a89f5..475917b 100644 --- a/scripts/imx/imx-usb-loader.c +++ b/scripts/imx/imx-usb-loader.c @@ -1334,7 +1334,7 @@ static void usage(const char *prgname) int main(int argc, char *argv[]) { - struct usb_id *p_id; + struct usb_id *p_id = NULL; struct mach_id *mach; libusb_device **devs; libusb_device *dev; @@ -1432,6 +1432,9 @@ int main(int argc, char *argv[]) ret = 0; out: + if (p_id) + free(p_id); + if (h) libusb_close(h); -- 1.8.3.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox