mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-20 06:21:09 +00:00
Don't do NULL-checks before SDL_free()
Replaces the pattern
if (ptr) {
SDL_free(ptr);
}
with
SDL_free(ptr);
This commit is contained in:
committed by
Sam Lantinga
parent
2f810e0a5f
commit
aaee09d6ed
@@ -354,12 +354,8 @@ static bool IsJoystick(const char *path, int *fd, char **name_return, Uint16 *ve
|
||||
return true;
|
||||
|
||||
error:
|
||||
if (driver) {
|
||||
SDL_free(driver);
|
||||
}
|
||||
if (name) {
|
||||
SDL_free(name);
|
||||
}
|
||||
SDL_free(driver);
|
||||
SDL_free(name);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user