mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 08:20:12 +01:00
svga: Prevent potential null pointer dereference in vmw_surface.c.
This commit is contained in:
parent
949d95e88a
commit
69671df74c
1 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue