jtag: avoid checking for non NULL pointer to free it
[fw/openocd] / src / jtag / aice / aice_usb.c
index 5a200eb774b421bc5154693291f8eebcb940454e..7144632df9468fcfe53bd63f107e68ea953eaf89 100644 (file)
@@ -2537,15 +2537,9 @@ static int aice_usb_close(void)
 {
        jtag_libusb_close(aice_handler.usb_handle);
 
-       if (custom_srst_script)
-               free(custom_srst_script);
-
-       if (custom_trst_script)
-               free(custom_trst_script);
-
-       if (custom_restart_script)
-               free(custom_restart_script);
-
+       free(custom_srst_script);
+       free(custom_trst_script);
+       free(custom_restart_script);
        return ERROR_OK;
 }