From: Kevin O'Connor Date: Mon, 20 Feb 2012 07:59:36 +0000 (-0500) Subject: Free USB MSC pipes on error. X-Git-Tag: rel-1.7.0~44 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4bfc4ec6050b39a9135d7cfe66a226b6a746d52c;p=seabios.git Free USB MSC pipes on error. Signed-off-by: Kevin O'Connor --- diff --git a/src/usb-msc.c b/src/usb-msc.c index ef9f440..06779b3 100644 --- a/src/usb-msc.c +++ b/src/usb-msc.c @@ -169,6 +169,10 @@ usb_msc_init(struct usb_pipe *pipe return 0; fail: dprintf(1, "Unable to configure USB MSC device.\n"); - free(udrive_g); + if (udrive_g) { + free_pipe(udrive_g->bulkin); + free_pipe(udrive_g->bulkout); + free(udrive_g); + } return -1; }