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

@@ -24,7 +24,7 @@
static struct frame_meta *
frame_meta_new(uint64_t pts) {
struct frame_meta *meta = malloc(sizeof(*meta));
struct frame_meta *meta = SDL_malloc(sizeof(*meta));
if (!meta) {
return meta;
}
@@ -35,7 +35,7 @@ frame_meta_new(uint64_t pts) {
static void
frame_meta_delete(struct frame_meta *frame_meta) {
free(frame_meta);
SDL_free(frame_meta);
}
static bool