[Mesa-stable] [Mesa-dev] [PATCH 1/3] vulkan/wsi/x11: Better handle wsi_x11_connection_create failure

Jason Ekstrand jason at jlekstrand.net
Wed Nov 2 16:28:01 UTC 2016


Thanks to both of you.  Pushed.

On Wed, Nov 2, 2016 at 3:11 AM, Eric Engestrom <eric.engestrom at imgtec.com>
wrote:

> On Tuesday, 2016-11-01 17:56:05 -0700, Jason Ekstrand wrote:
> > Without this fix, the function would still end up returning NULL but it
> > would put that NULL connection in the hash table which would be bad.
> >
> > Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
> > Cc: "13.0" <mesa-stable at lists.freedesktop.org>
> > Cc: Dave Airlie <airlied at redhat.com>
>
> Series is:
> Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
>
> > ---
> >  src/vulkan/wsi/wsi_common_x11.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/src/vulkan/wsi/wsi_common_x11.c
> b/src/vulkan/wsi/wsi_common_x11.c
> > index 8142847..eee2359 100644
> > --- a/src/vulkan/wsi/wsi_common_x11.c
> > +++ b/src/vulkan/wsi/wsi_common_x11.c
> > @@ -118,6 +118,8 @@ wsi_x11_get_connection(struct wsi_device *wsi_dev,
> >
> >        struct wsi_x11_connection *wsi_conn =
> >           wsi_x11_connection_create(alloc, conn);
> > +      if (!wsi_conn)
> > +         return NULL;
> >
> >        pthread_mutex_lock(&wsi->mutex);
> >
> > --
> > 2.5.0.400.gff86faf
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-stable/attachments/20161102/8bc43c4b/attachment.html>


More information about the mesa-stable mailing list