From: Vinson Lee Date: Sun, 22 Nov 2009 06:26:32 +0000 (-0500) Subject: svga: Prevent potential null pointer deference in vmw_surface.c. X-Git-Tag: 062012170305~15631^2~99^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57d389aab5ea4462475756c0e262f3cb543f889d;p=profile%2Fivi%2Fmesa.git svga: Prevent potential null pointer deference in vmw_surface.c. --- diff --git a/src/gallium/winsys/drm/vmware/core/vmw_surface.c b/src/gallium/winsys/drm/vmware/core/vmw_surface.c index 9ec4bf9..c19e556 100644 --- a/src/gallium/winsys/drm/vmware/core/vmw_surface.c +++ b/src/gallium/winsys/drm/vmware/core/vmw_surface.c @@ -39,7 +39,7 @@ vmw_svga_winsys_surface_reference(struct vmw_svga_winsys_surface **pdst, struct pipe_reference *dst_ref; struct vmw_svga_winsys_surface *dst = *pdst; - if(*pdst == src || pdst == NULL) + if(pdst == NULL || *pdst == src) return; src_ref = src ? &src->refcnt : NULL;