[spice-common 1/8] coverity: avoid use after free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 common/canvas_utils.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/canvas_utils.c b/common/canvas_utils.c
index c5813f4..0be761a 100644
--- a/common/canvas_utils.c
+++ b/common/canvas_utils.c
@@ -109,6 +109,7 @@ static inline pixman_image_t *__surface_create_stride(pixman_format_code_t forma
 
     if (surface == NULL) {
         free(data);
+        data = NULL;
         spice_error("create surface failed, out of memory");
     }
 
-- 
2.7.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]