[Spice-devel] [PATCH 01/11] syntax-check: fix avoid_if_before_free

Uri Lublin uril at redhat.com
Wed Jul 17 07:04:11 PDT 2013


---
 server/red_parse_qxl.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/server/red_parse_qxl.c b/server/red_parse_qxl.c
index 65781e7..7d4d4a1 100644
--- a/server/red_parse_qxl.c
+++ b/server/red_parse_qxl.c
@@ -490,12 +490,8 @@ static SpiceImage *red_get_image(RedMemSlotInfo *slots, int group_id,
     }
     return red;
 error:
-    if (red) {
-        free(red);
-    }
-    if (rp) {
-        free(rp);
-    }
+    free(red);
+    free(rp);
     return NULL;
 }

-- 
1.8.1.4



More information about the Spice-devel mailing list