swr: Remove unnecessary memset call

Zeroing memory after calloc is not necessary. This also allows to avoid
possible crash when allocation fails, because memset is called before
checking screen for NULL.

Fixes: a29d63ecf7 "swr: refactor swr_create_screen to allow
                              for proper cleanup on error"
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
This commit is contained in:
Vlad Golovkin 2018-08-01 20:56:23 +03:00 committed by Eric Engestrom
parent 8d3ccdbb9b
commit 9d3a2394e4
1 changed files with 0 additions and 1 deletions

View File

@ -1148,7 +1148,6 @@ struct pipe_screen *
swr_create_screen_internal(struct sw_winsys *winsys)
{
struct swr_screen *screen = CALLOC_STRUCT(swr_screen);
memset(screen, 0, sizeof(struct swr_screen));
if (!screen)
return NULL;