src/thread/win32/SDL_sysmutex.c
changeset 1336 3692456e7b0f
parent 1330 450721ad5436
child 1338 604d73db6802
     1.1 --- a/src/thread/win32/SDL_sysmutex.c	Mon Feb 06 17:28:04 2006 +0000
     1.2 +++ b/src/thread/win32/SDL_sysmutex.c	Tue Feb 07 06:59:48 2006 +0000
     1.3 @@ -39,13 +39,13 @@
     1.4  	SDL_mutex *mutex;
     1.5  
     1.6  	/* Allocate mutex memory */
     1.7 -	mutex = (SDL_mutex *)malloc(sizeof(*mutex));
     1.8 +	mutex = (SDL_mutex *)SDL_malloc(sizeof(*mutex));
     1.9  	if ( mutex ) {
    1.10  		/* Create the mutex, with initial value signaled */
    1.11  		mutex->id = CreateMutex(NULL, FALSE, NULL);
    1.12  		if ( ! mutex->id ) {
    1.13  			SDL_SetError("Couldn't create mutex");
    1.14 -			free(mutex);
    1.15 +			SDL_free(mutex);
    1.16  			mutex = NULL;
    1.17  		}
    1.18  	} else {
    1.19 @@ -62,7 +62,7 @@
    1.20  			CloseHandle(mutex->id);
    1.21  			mutex->id = 0;
    1.22  		}
    1.23 -		free(mutex);
    1.24 +		SDL_free(mutex);
    1.25  	}
    1.26  }
    1.27