summaryrefslogtreecommitdiffstats
path: root/common/gdi_canvas.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2011-12-12 17:53:04 +0000
committerAlon Levy <alevy@redhat.com>2012-01-13 18:11:58 +0200
commitfaf0947ebbcdbd2088d6349e936a23b24d09153b (patch)
treebd3376100183cb58cbf9351a12efd7e47a7e423a /common/gdi_canvas.c
parent64f4826b6d6918b81d336f8c4296dc6094067f64 (diff)
downloadspice-faf0947ebbcdbd2088d6349e936a23b24d09153b.tar.gz
spice-faf0947ebbcdbd2088d6349e936a23b24d09153b.tar.xz
spice-faf0947ebbcdbd2088d6349e936a23b24d09153b.zip
Remove useless if() before free()
The free() function allows NULL to be passed in, so any code which puts a if() before free() is wasting time
Diffstat (limited to 'common/gdi_canvas.c')
-rw-r--r--common/gdi_canvas.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/common/gdi_canvas.c b/common/gdi_canvas.c
index 1a46ac1a..5c9cdf01 100644
--- a/common/gdi_canvas.c
+++ b/common/gdi_canvas.c
@@ -1773,9 +1773,7 @@ static void gdi_canvas_draw_stroke(SpiceCanvas *spice_canvas, SpiceRect *bbox, S
}
#endif
- if (user_style) {
- free(user_style);
- }
+ free(user_style);
}
static void gdi_canvas_clear(SpiceCanvas *spice_canvas)