comparison src/file/SDL_rwops.c @ 1202:0748fbb272e7

Matched SDL_AllowRW and SDL_FreeRW calls in SDL_rwops.c ...
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 12 Dec 2005 10:54:41 +0000
parents e2ef6b7001fd
children 905d5b482f2a
comparison
equal deleted inserted replaced
1201:718d00094f82 1202:0748fbb272e7
72 if ( context ) { 72 if ( context ) {
73 if ( context->hidden.stdio.autoclose ) { 73 if ( context->hidden.stdio.autoclose ) {
74 /* WARNING: Check the return value here! */ 74 /* WARNING: Check the return value here! */
75 fclose(context->hidden.stdio.fp); 75 fclose(context->hidden.stdio.fp);
76 } 76 }
77 free(context); 77 SDL_FreeRW(context);
78 } 78 }
79 return(0); 79 return(0);
80 } 80 }
81 81
82 /* Functions to read/write memory pointers */ 82 /* Functions to read/write memory pointers */
143 return(-1); 143 return(-1);
144 } 144 }
145 static int mem_close(SDL_RWops *context) 145 static int mem_close(SDL_RWops *context)
146 { 146 {
147 if ( context ) { 147 if ( context ) {
148 free(context); 148 SDL_FreeRW(context);
149 } 149 }
150 return(0); 150 return(0);
151 } 151 }
152 152
153 /* Functions to create SDL_RWops structures from various data sources */ 153 /* Functions to create SDL_RWops structures from various data sources */