stlinkv3_spi: Fix memory leak

Change-Id: Ic650b43395c64b1677f6e114b0faf42a3b7b3759
Found-by: Coverity Scan #1415214
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/40652
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Original-Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/71307
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
diff --git a/stlinkv3_spi.c b/stlinkv3_spi.c
index d56f305..ae865be 100644
--- a/stlinkv3_spi.c
+++ b/stlinkv3_spi.c
@@ -496,6 +496,7 @@
 				 speed_str);
 			msg_perr("Please pass the parameter "
 				 "with a simple non-zero number in kHz\n");
+			free(speed_str);
 			return -1;
 		}
 		free(speed_str);