summaryrefslogtreecommitdiff
path: root/hw/kdrive/ephyr/ephyrdriext.c
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2010-01-02 05:43:26 +0600
committerKeith Packard <keithp@keithp.com>2010-01-01 23:27:53 -0800
commit2c85d72fc7bd013af327321ad5d626dc73c3caf0 (patch)
tree4b702217f44a81bd00abd7d3ef39d6f79d477093 /hw/kdrive/ephyr/ephyrdriext.c
parent15bc35c6e44c65812de5c3e85ec8bbf78b032ded (diff)
Do not check xfree argument for NULL
xfree itself checks for NULL, and even this is not necessary as passing NULL to free(3) is safe. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/kdrive/ephyr/ephyrdriext.c')
-rw-r--r--hw/kdrive/ephyr/ephyrdriext.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index f741d7420..5f5fd3bff 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -440,10 +440,9 @@ ephyrDRIClipNotify (WindowPtr a_win,
is_ok = TRUE ;
out:
- if (rects) {
- xfree (rects) ;
- rects = NULL ;
- }
+ xfree (rects) ;
+ rects = NULL ;
+
EPHYR_LOG ("leave. is_ok:%d\n", is_ok) ;
/*do cleanup here*/
}
@@ -566,10 +565,9 @@ EphyrDuplicateVisual (unsigned int a_screen,
is_ok = TRUE ;
out:
- if (new_visuals) {
- xfree (new_visuals) ;
- new_visuals = NULL ;
- }
+ xfree (new_visuals) ;
+ new_visuals = NULL ;
+
EPHYR_LOG ("leave\n") ;
return is_ok ;
}
@@ -1254,10 +1252,9 @@ ProcXF86DRIGetDrawableInfo (register ClientPtr client)
sizeof(drm_clip_rect_t) * rep.numBackClipRects,
(char *)backClipRects);
}
- if (clipRects) {
- xfree(clipRects);
- clipRects = NULL ;
- }
+ xfree(clipRects);
+ clipRects = NULL ;
+
EPHYR_LOG ("leave\n") ;
return (client->noClientException);