From: Antonio Borneo Date: Mon, 17 Aug 2020 08:05:11 +0000 (+0200) Subject: jtag: avoid checking for non NULL pointer to free it X-Git-Tag: v0.11.0-rc1~127 X-Git-Url: https://review.openocd.org/gitweb?a=commitdiff_plain;h=24db985f602bbe21ee4d10147937ed897f28a555;hp=24db985f602bbe21ee4d10147937ed897f28a555;p=openocd.git jtag: avoid checking for non NULL pointer to free it The function free() can be called with a NULL pointer as argument, no need to check the argument before. If the pointer is NULL, no operation is performed by free(). Remove the occurrences of pattern: if (ptr) free(ptr); Change-Id: I2938e333bd1eac5218bd67aefb9d8f373da017a8 Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/5810 Tested-by: jenkins ---