Am 30.09.2014 15:16, schrieb Brian Paul: > The screen argument isn't actually used by lp_jit_screen_init() at this > time, but let's move the call so that we pass a valid pointer. > > v2: don't leak screen if lp_jit_screen_init() fails. > --- > src/gallium/drivers/llvmpipe/lp_screen.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c > b/src/gallium/drivers/llvmpipe/lp_screen.c > index 3025322..a264f99 100644 > --- a/src/gallium/drivers/llvmpipe/lp_screen.c > +++ b/src/gallium/drivers/llvmpipe/lp_screen.c > @@ -557,9 +557,6 @@ llvmpipe_create_screen(struct sw_winsys *winsys) > return NULL; > #endif > > - if (!lp_jit_screen_init(screen)) > - return NULL; > - > #ifdef DEBUG > LP_DEBUG = debug_get_flags_option("LP_DEBUG", lp_debug_flags, 0 ); > #endif > @@ -570,6 +567,11 @@ llvmpipe_create_screen(struct sw_winsys *winsys) > if (!screen) > return NULL; > > + if (!lp_jit_screen_init(screen)) { > + FREE(screen); > + return NULL; > + } > + > screen->winsys = winsys; > > screen->base.destroy = llvmpipe_destroy_screen; >
Reviewed-by: Roland Scheidegger <srol...@vmware.com> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev