Module: Mesa
Branch: mesa_7_7_branch
Commit: 69671df74c8b45f08149c248a7ee905912aec2b0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=69671df74c8b45f08149c248a7ee905912aec2b0

Author: Vinson Lee <[email protected]>
Date:   Thu Nov 26 23:02:49 2009 -0500

svga: Prevent potential null pointer dereference in vmw_surface.c.

---

 src/gallium/winsys/drm/vmware/core/vmw_surface.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gallium/winsys/drm/vmware/core/vmw_surface.c 
b/src/gallium/winsys/drm/vmware/core/vmw_surface.c
index c19e556..64eb32f 100644
--- 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;
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to