thor:cmd: get the default command arguments from environment
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Thu, 12 Jun 2014 08:20:59 +0000 (10:20 +0200)
committerChanho Park <chanho61.park@samsung.com>
Mon, 11 Apr 2016 03:53:15 +0000 (12:53 +0900)
This change adds support to getting the default DFU cmd line
arguments from the environment.

DFU and THOR uses the same command line arguments,
so the DFU command environment setup can be used also with THOR.

Change-Id: I2e0984c909147c13191f6d6646d094c9f02c392a
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
common/cmd_thordown.c

index f0e50436d5daad16781098e3feffc1929a96a9b5..7e65a32d8169a004c3bce296654b6a2a0168ec49 100644 (file)
@@ -76,6 +76,12 @@ exit:
        board_usb_cleanup(controller_index, USB_INIT_DEVICE);
 done:
        dfu_free_entities();
+bad_args:
+       if (argc == 1) {
+               free(usb_controller);
+               free(interface);
+               free(devstring);
+       }
 
 bad_args:
        if (argc == 1) {