Fixing valgrind errors.

One of the error was the result of an unitended recursive call to X11_GL_LoadLibrary which was also fixed.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402739
This commit is contained in:
Bob Pendleton 2008-03-06 17:08:10 +00:00
parent e6d4abc63e
commit 011c8c6dc3
3 changed files with 29 additions and 27 deletions

View file

@ -56,20 +56,6 @@ SetupWindowData(_THIS, SDL_Window * window, Window w, BOOL created)
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 @@ X11_CreateWindow(_THIS, SDL_Window * window)
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 @@ X11_DestroyWindow(_THIS, SDL_Window * window)
XDestroyWindow(display, data->window);
}
SDL_free(data);
window->driverdata = NULL;
}
}