Skip to content

Commit

Permalink
Fill allocated chunk with zero, useful when no identifiable chunk is …
Browse files Browse the repository at this point in the history
…found, because SDL_FreeWAV only checks for buffer being NULL
  • Loading branch information
pmandin committed Dec 19, 2006
1 parent ec6e6cb commit e0ec6cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mixer.c
Expand Up @@ -512,7 +512,7 @@ Mix_Chunk *Mix_QuickLoad_WAV(Uint8 *mem)
}

/* Allocate the chunk memory */
chunk = (Mix_Chunk *)malloc(sizeof(Mix_Chunk));
chunk = (Mix_Chunk *)calloc(sizeof(Mix_Chunk));
if ( chunk == NULL ) {
SDL_SetError("Out of memory");
return(NULL);
Expand Down

0 comments on commit e0ec6cf

Please sign in to comment.