summaryrefslogtreecommitdiffstats
path: root/server/tests
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 /server/tests
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 'server/tests')
-rw-r--r--server/tests/test_display_base.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c
index 81f942bc..579ef1e4 100644
--- a/server/tests/test_display_base.c
+++ b/server/tests/test_display_base.c
@@ -29,9 +29,7 @@ static void test_spice_destroy_update(SimpleSpiceUpdate *update)
if (!update) {
return;
}
- if (update->bitmap) {
- free(update->bitmap);
- }
+ free(update->bitmap);
free(update);
}