winsys/svga: fix error path when kernel is not able to create surface
authorDeepak Rawat <drawat@vmware.com>
Mon, 3 Apr 2017 15:12:43 +0000 (08:12 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 26 Apr 2017 17:37:59 +0000 (11:37 -0600)
commit8de0452ec4d96837846fffc65bc01a56103b9ed5
tree8bb0e47203dcd86626b98dc5e49b17a5035fe0e5
parent75be43ed33e7ce01d74bb294c41feec821ecf685
winsys/svga: fix error path when kernel is not able to create surface

If for some reason kernel is not able to create surface,
when no buffer was provided the function
vmw_svga_winsys_surface_create should return NULL.

This patch fixes the issue where the code was not following the
clean up path in case of error, which used to cause SIGSEGV.

Reviewed-by: Sinclair Yeh <syeh@vmware.com>
src/gallium/winsys/svga/drm/vmw_screen_svga.c