Always use SDL_malloc() and SDL_free()

To avoid mixing SDL_malloc()/SDL_strdup() with free(), or malloc() with
SDL_free(), always use the SDL version.
This commit is contained in:
Romain Vimont
2019-05-30 00:10:45 +02:00
parent 7ed976967f
commit 3bc1c51b91
4 changed files with 12 additions and 10 deletions

View File

@@ -147,7 +147,7 @@ adb_push(const char *serial, const char *local, const char *remote) {
}
remote = strquote(remote);
if (!remote) {
free((void *) local);
SDL_free((void *) local);
return PROCESS_NONE;
}
#endif
@@ -156,8 +156,8 @@ adb_push(const char *serial, const char *local, const char *remote) {
process_t proc = adb_execute(serial, adb_cmd, ARRAY_LEN(adb_cmd));
#ifdef __WINDOWS__
free((void *) remote);
free((void *) local);
SDL_free((void *) remote);
SDL_free((void *) local);
#endif
return proc;
@@ -178,7 +178,7 @@ adb_install(const char *serial, const char *local) {
process_t proc = adb_execute(serial, adb_cmd, ARRAY_LEN(adb_cmd));
#ifdef __WINDOWS__
free((void *) local);
SDL_free((void *) local);
#endif
return proc;