diff options
Diffstat (limited to 'src/gallium/state_trackers/glx')
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/xm_api.c | 6 | ||||
-rw-r--r-- | src/gallium/state_trackers/glx/xlib/xm_st.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c index 4b81755dcfa..7e915567a43 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_api.c +++ b/src/gallium/state_trackers/glx/xlib/xm_api.c @@ -168,10 +168,8 @@ xmesa_init_display( Display *display ) xmdpy->screen->destroy(xmdpy->screen); xmdpy->screen = NULL; } - if (xmdpy->smapi) { - free(xmdpy->smapi); - xmdpy->smapi = NULL; - } + free(xmdpy->smapi); + xmdpy->smapi = NULL; xmdpy->display = NULL; } diff --git a/src/gallium/state_trackers/glx/xlib/xm_st.c b/src/gallium/state_trackers/glx/xlib/xm_st.c index ee425ec2b59..7b54df5998c 100644 --- a/src/gallium/state_trackers/glx/xlib/xm_st.c +++ b/src/gallium/state_trackers/glx/xlib/xm_st.c @@ -278,10 +278,8 @@ xmesa_create_st_framebuffer(XMesaDisplay xmdpy, XMesaBuffer b) stfbi = CALLOC_STRUCT(st_framebuffer_iface); xstfb = CALLOC_STRUCT(xmesa_st_framebuffer); if (!stfbi || !xstfb) { - if (stfbi) - free(stfbi); - if (xstfb) - free(xstfb); + free(stfbi); + free(xstfb); return NULL; } |