소스 검색

PSP: Fixed memory leak if video init failed.

Philipp Wiesemann 9 년 전
부모
커밋
82c94a3f79
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/video/psp/SDL_pspvideo.c

+ 1 - 0
src/video/psp/SDL_pspvideo.c

@@ -92,6 +92,7 @@ PSP_Create()
     if (gldata == NULL) {
     if (gldata == NULL) {
         SDL_OutOfMemory();
         SDL_OutOfMemory();
         SDL_free(device);
         SDL_free(device);
+        SDL_free(phdata);
         return NULL;
         return NULL;
     }
     }
     device->gl_data = gldata;
     device->gl_data = gldata;