projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
949d95e
)
svga: Prevent potential null pointer dereference in vmw_surface.c.
author
Vinson Lee
<vlee@vmware.com>
Fri, 27 Nov 2009 04:02:49 +0000
(23:02 -0500)
committer
Vinson Lee
<vlee@vmware.com>
Fri, 27 Nov 2009 04:03:53 +0000
(23:03 -0500)
src/gallium/winsys/drm/vmware/core/vmw_surface.c
patch
|
blob
|
history
diff --git
a/src/gallium/winsys/drm/vmware/core/vmw_surface.c
b/src/gallium/winsys/drm/vmware/core/vmw_surface.c
index c19e556df9fe47b1cbc8c5b29020443c950b4951..64eb32f8b94ef8f52356ef27af5c99409f50e03c 100644
(file)
--- a/
src/gallium/winsys/drm/vmware/core/vmw_surface.c
+++ b/
src/gallium/winsys/drm/vmware/core/vmw_surface.c
@@
-37,11
+37,13
@@
vmw_svga_winsys_surface_reference(struct vmw_svga_winsys_surface **pdst,
{
struct pipe_reference *src_ref;
struct pipe_reference *dst_ref;
- struct vmw_svga_winsys_surface *dst
= *pdst
;
-
+ struct vmw_svga_winsys_surface *dst;
+
if(pdst == NULL || *pdst == src)
return;
-
+
+ dst = *pdst;
+
src_ref = src ? &src->refcnt : NULL;
dst_ref = dst ? &dst->refcnt : NULL;