shell: allocate enough memory for shsurf->ping_timer
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fri, 27 Apr 2012 10:55:55 +0000 (13:55 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 27 Apr 2012 19:06:18 +0000 (15:06 -0400)
src/shell.c

index 9c844b5..2001133 100644 (file)
@@ -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;