Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11window.c @ 2322:c25d45b7add3
Fixing valgrind errors.
One of the error was the result of an unitended recursive call to X11_GL_LoadLibrary which was also fixed.
author | Bob Pendleton <bob@pendleton.com> |
---|---|
date | Thu, 06 Mar 2008 17:08:10 +0000 |
parents | c5feceb0395e |
children | 4ac07ae446d3 |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11window.c Tue Mar 04 23:09:28 2008 +0000 +++ b/src/video/x11/SDL_x11window.c Thu Mar 06 17:08:10 2008 +0000 @@ -56,20 +56,6 @@ data->created = created; data->videodata = videodata; - /* Associate the data with the window */ - windowlist = - (SDL_WindowData **) SDL_realloc(windowlist, - (numwindows + - 1) * sizeof(*windowlist)); - if (!windowlist) { - SDL_OutOfMemory(); - SDL_free(data); - return -1; - } - windowlist[numwindows++] = data; - videodata->numwindows = numwindows; - videodata->windowlist = windowlist; - /* Fill in the SDL window with the window data */ { XWindowAttributes attrib; @@ -228,6 +214,7 @@ return -1; } SDL_memcpy(&cmap, stdmaps, sizeof(XStandardColormap)); + XFree(stdmaps); } /* OK, we have the best color map, now copy it for use by the @@ -655,6 +642,7 @@ XDestroyWindow(display, data->window); } SDL_free(data); + window->driverdata = NULL; } }