mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-17 19:48:51 +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:
parent
2f810e0a5f
commit
aaee09d6ed
40 changed files with 76 additions and 229 deletions
|
|
@ -564,9 +564,7 @@ const char *SDL_getenv_unsafe(const char *name)
|
|||
maxlen = length;
|
||||
} else {
|
||||
if (GetLastError() != ERROR_SUCCESS) {
|
||||
if (string) {
|
||||
SDL_free(string);
|
||||
}
|
||||
SDL_free(string);
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue