[PATCH] shell: allocate enough memory for shsurf->ping_timer

Scott Moreau oreaus at gmail.com
Fri Apr 27 06:59:36 PDT 2012


On Fri, Apr 27, 2012 at 4:55 AM, Ander Conselvan de Oliveira <
ander.conselvan.de.oliveira at intel.com> wrote:

> ---
>  src/shell.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/shell.c b/src/shell.c
> index 9c844b5..2001133 100644
> --- a/src/shell.c
> +++ b/src/shell.c
> @@ -447,7 +447,7 @@ ping_handler(struct weston_surface *surface, uint32_t
> serial)
>                return;
>
>        if (!shsurf->ping_timer) {
> -               shsurf->ping_timer = malloc(sizeof shsurf->ping_timer);
> +               shsurf->ping_timer = malloc(sizeof *shsurf->ping_timer);
>                if (!shsurf->ping_timer)
>                        return;
>
> --
> 1.7.4.1
>
>
Oops, thanks for catching that.


Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20120427/b02d6910/attachment.html>


More information about the wayland-devel mailing list