[Xcb-commit] keysyms renderutil

Julien Danjou jdanjou at kemper.freedesktop.org
Tue Oct 12 02:31:18 PDT 2010


 keysyms/keysyms.c  |    2 ++
 renderutil/glyph.c |    2 ++
 2 files changed, 4 insertions(+)

New commits:
commit 023fdd2e06e4a5d2295830eec563cedd07b60bbb
Author: Joshua Phillips <jp.sittingduck at gmail.com>
Date:   Fri Oct 8 19:10:05 2010 +0100

    Check for malloc failure in two places.
    
    In xcb_key_symbols_alloc.
    In xcb_render_util_composite_text_stream.
    
    Signed-off-by: Julien Danjou <julien at danjou.info>

diff --git a/keysyms/keysyms.c b/keysyms/keysyms.c
index c3e7f2e..062424c 100644
--- a/keysyms/keysyms.c
+++ b/keysyms/keysyms.c
@@ -81,6 +81,8 @@ xcb_key_symbols_alloc (xcb_connection_t *c)
     return NULL;
 
   syms = malloc (sizeof (xcb_key_symbols_t));
+  if (!syms)
+    return NULL;
 
   syms->c = c;
   syms->tag = TAG_COOKIE;
diff --git a/renderutil/glyph.c b/renderutil/glyph.c
index 1721cad..4996202 100644
--- a/renderutil/glyph.c
+++ b/renderutil/glyph.c
@@ -66,6 +66,8 @@ xcb_render_util_composite_text_stream (
 	}
 
 	stream = malloc(sizeof(xcb_render_util_composite_text_stream_t));
+	if (!stream)
+		return NULL;
 
 	stream->glyph_size = 0;
 	stream->initial_glyphset = initial_glyphset;


More information about the xcb-commit mailing list