From e49321cec5806c05b6b67404052f953f3e0f2987 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 10 Aug 2022 08:20:54 -0700 Subject: [PATCH] Fixed double-free in combined HIDAPI controller code --- src/joystick/hidapi/SDL_hidapi_combined.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/joystick/hidapi/SDL_hidapi_combined.c b/src/joystick/hidapi/SDL_hidapi_combined.c index 27da8dd6e8..06f3d5510c 100644 --- a/src/joystick/hidapi/SDL_hidapi_combined.c +++ b/src/joystick/hidapi/SDL_hidapi_combined.c @@ -90,7 +90,6 @@ HIDAPI_DriverCombined_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joys } else { SDL_strlcpy(new_serial, joystick->serial, new_length); } - SDL_free(serial); serial = new_serial; serial_length = new_length; }