From 01e915b2775b78d461c873bac1b2787985196a5f Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 3 Apr 2006 00:55:03 +0000 Subject: Coverity #929: Additional defensive NULL check. --- ChangeLog | 3 +++ src/XEVI.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9b481e9..318303f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * src/Xdbe.c: Coverity #575: Plug a leak on the error path. + * src/XEVI.c: + Coverity #929: Additional defensive NULL check. + 2006-02-12 Alan Coopersmith * man/Makefile.am: diff --git a/src/XEVI.c b/src/XEVI.c index a64b9c1..dd796a4 100644 --- a/src/XEVI.c +++ b/src/XEVI.c @@ -120,7 +120,7 @@ Status XeviGetVisualInfo( *n_info_return = 0; *evi_return = NULL; vinfo = XGetVisualInfo(dpy, 0, NULL, &sz_info); - if (!vinfo) { + if (!vinfo || !evi_return) { return BadValue; } if (!n_visual || !visual) { /* copy the all visual */ -- cgit v1.2.3