Fixed double-free in combined HIDAPI controller code

This commit is contained in:
Sam Lantinga 2022-08-10 08:20:54 -07:00
parent 6ecfc40697
commit e49321cec5
1 changed files with 0 additions and 1 deletions

View File

@ -90,7 +90,6 @@ HIDAPI_DriverCombined_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joys
} else { } else {
SDL_strlcpy(new_serial, joystick->serial, new_length); SDL_strlcpy(new_serial, joystick->serial, new_length);
} }
SDL_free(serial);
serial = new_serial; serial = new_serial;
serial_length = new_length; serial_length = new_length;
} }