summaryrefslogtreecommitdiff
path: root/va
diff options
context:
space:
mode:
authorVictor Toso <me@victortoso.com>2017-11-15 14:39:15 +0100
committerXiang, Haihao <haihao.xiang@intel.com>2017-11-16 17:58:58 -0800
commitb95c2a4c648d9e34770c4364854d4501f7bca3db (patch)
tree9148fab059cce342f6d665944758b2b22802d805 /va
parent992227debe1b5e25da53b2606b4f67c46eb7ad46 (diff)
downloadlibva-b95c2a4c648d9e34770c4364854d4501f7bca3db.tar.gz
coverity: fix check_after_deref
- /va/x11/dri2_util.c: > libva-1.8.3/va/x11/dri2_util.c:218: check_after_deref: Null-checking > "device_name" suggests that it may be null, but it has already been > dereferenced on all paths leading to the check. Signed-off-by: Victor Toso <victortoso@redhat.com>
Diffstat (limited to 'va')
-rw-r--r--va/x11/dri2_util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/va/x11/dri2_util.c b/va/x11/dri2_util.c
index 5f140f7..e383db1 100644
--- a/va/x11/dri2_util.c
+++ b/va/x11/dri2_util.c
@@ -215,8 +215,7 @@ va_isDRI2Connected(VADriverContextP ctx, char **driver_name)
dri_state->close = dri2Close;
gsDRI2SwapAvailable = (minor >= 2);
- if (device_name)
- Xfree(device_name);
+ Xfree(device_name);
return True;