Hi,

Sorry for delay. I agree with your point. Thank you for good update.

BR,
Nobuhiko Tanibata

> -----Original Message-----
> From: wayland-devel
> [mailto:[email protected]] On Behalf Of Bryce
> Harrington
> Sent: Thursday, January 29, 2015 11:55 AM
> To: Carlos Olmedo Escobar
> Cc: [email protected]
> Subject: Re: [PATCH weston] ivi-shell-transition: check
> create_layout_transition() return value.
> 
> On Sat, Jan 17, 2015 at 07:43:02PM +0100, Carlos Olmedo Escobar wrote:
> > Signed-off-by: Carlos Olmedo Escobar <[email protected]>
> Reviewed-by: Bryce Harrington <[email protected]>
> 
> This patch simply does null pointer checks for several malloc calls.
> Entirely safe and appropriate to do here.
> 
> Looks like Nobuhiko Tanibata also agreed with the patch, so I've added
> him as a reviewer, hope that's okay.
> 
> Thanks, applied:
>    7a8d67d..e82ba53  master -> master
> 
> 
> > ---
> >  ivi-shell/ivi-layout-transition.c | 16 ++++++++++++----
> >  1 file changed, 12 insertions(+), 4 deletions(-)
> >
> > diff --git a/ivi-shell/ivi-layout-transition.c
> > b/ivi-shell/ivi-layout-transition.c
> > index 1e9ee23..904e8d6 100644
> > --- a/ivi-shell/ivi-layout-transition.c
> > +++ b/ivi-shell/ivi-layout-transition.c
> > @@ -328,8 +328,10 @@ create_move_resize_view_transition(
> >                     uint32_t duration)
> >  {
> >     struct ivi_layout_transition *transition =
> create_layout_transition();
> > -   struct move_resize_view_data *data = malloc(sizeof(*data));
> > +   if (transition == NULL)
> > +           return NULL;
> >
> > +   struct move_resize_view_data *data = malloc(sizeof(*data));
> >     if (data == NULL) {
> >             weston_log("%s: memory allocation fails\n", __func__);
> >             return NULL;
> > @@ -451,8 +453,10 @@ create_fade_view_transition(
> >                     uint32_t duration)
> >  {
> >     struct ivi_layout_transition *transition =
> create_layout_transition();
> > -   struct fade_view_data *data = malloc(sizeof(*data));
> > +   if (transition == NULL)
> > +           return NULL;
> >
> > +   struct fade_view_data *data = malloc(sizeof(*data));
> >     if (data == NULL) {
> >             weston_log("%s: memory allocation fails\n", __func__);
> >             return NULL;
> > @@ -675,8 +679,10 @@ create_move_layer_transition(
> >             uint32_t duration)
> >  {
> >     struct ivi_layout_transition *transition =
> create_layout_transition();
> > -   struct move_layer_data *data = malloc(sizeof(*data));
> > +   if (transition == NULL)
> > +           return NULL;
> >
> > +   struct move_layer_data *data = malloc(sizeof(*data));
> >     if (data == NULL) {
> >             weston_log("%s: memory allocation fails\n", __func__);
> >             return NULL;
> > @@ -819,8 +825,10 @@ ivi_layout_transition_fade_layer(
> >     }
> >
> >     transition = create_layout_transition();
> > -   data = malloc(sizeof(*data));
> > +   if (transition == NULL)
> > +           return;
> >
> > +   data = malloc(sizeof(*data));
> >     if (data == NULL) {
> >             weston_log("%s: memory allocation fails\n", __func__);
> >             return;
> > --
> > 2.1.4
> >
> > _______________________________________________
> > wayland-devel mailing list
> > [email protected]
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> _______________________________________________
> wayland-devel mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to