X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fjtag%2Fdrivers%2Fjtag_usb_common.c;fp=src%2Fjtag%2Fdrivers%2Fjtag_usb_common.c;h=969ea840624c7f90ba4ec0e73e98c7ca96225782;hp=6337272fb6160ac372bdc95877d0714cf56e4f2f;hb=24db985f602bbe21ee4d10147937ed897f28a555;hpb=a098a14eb53131871469a9c32b206b0dc55ef237 diff --git a/src/jtag/drivers/jtag_usb_common.c b/src/jtag/drivers/jtag_usb_common.c index 6337272fb6..969ea84062 100644 --- a/src/jtag/drivers/jtag_usb_common.c +++ b/src/jtag/drivers/jtag_usb_common.c @@ -23,8 +23,7 @@ void jtag_usb_set_location(const char *location) JTAG_USB_MAX_LOCATION_LENGTH) LOG_WARNING("usb location string is too long!!\n"); - if (jtag_usb_location) - free(jtag_usb_location); + free(jtag_usb_location); jtag_usb_location = strndup(location, JTAG_USB_MAX_LOCATION_LENGTH); }