[PATCH libICE 09/13] add check for malloc
walter harms
wharms at bfs.de
Wed Oct 18 16:03:47 UTC 2017
fix a potential null pointer deference error
Signed-off-by: Walter Harms <wharms at bfs.de>
---
src/replywait.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/replywait.c b/src/replywait.c
index b25c351..91a8dd6 100644
--- a/src/replywait.c
+++ b/src/replywait.c
@@ -60,7 +60,8 @@ _IceAddReplyWait (
}
savedReplyWait = malloc (sizeof (_IceSavedReplyWait));
-
+ if (!savedReplyWait)
+ return;
savedReplyWait->reply_wait = replyWait;
savedReplyWait->reply_ready = False;
savedReplyWait->next = NULL;
--
2.1.4
More information about the xorg-devel
mailing list