projects
/
platform
/
upstream
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d23146f
)
nouveau: free in error path if drmAvailable fails.
author
Dave Airlie
<airlied@redhat.com>
Wed, 19 Oct 2011 16:39:54 +0000
(17:39 +0100)
committer
Dave Airlie
<airlied@redhat.com>
Wed, 19 Oct 2011 16:39:54 +0000
(17:39 +0100)
This was reported in coverity.
Signed-off-by: Dave Airlie <airlied@redhat.com>
nouveau/nouveau_device.c
patch
|
blob
|
history
diff --git
a/nouveau/nouveau_device.c
b/nouveau/nouveau_device.c
index
2ffcba6
..
425c5d2
100644
(file)
--- a/
nouveau/nouveau_device.c
+++ b/
nouveau/nouveau_device.c
@@
-46,8
+46,10
@@
nouveau_device_open_existing(struct nouveau_device **dev, int close,
nvdev->needs_close = close;
ver = drmGetVersion(fd);
- if (!ver)
+ if (!ver) {
+ nouveau_device_close((void *)&nvdev);
return -EINVAL;
+ }
if ((ver->version_major == 0 && ver->version_patchlevel != 16) ||
ver->version_major > 1) {