[PATCH libinput 5/5] zalloc the libinput_source, don't malloc it
Jonas Ådahl
jadahl at gmail.com
Mon Feb 2 18:18:54 PST 2015
On Tue, Feb 03, 2015 at 11:07:06AM +1000, Peter Hutterer wrote:
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Reviewed-by: Jonas Ådahl <jadahl at gmail.com> on the whole series.
> ---
> src/libinput.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/libinput.c b/src/libinput.c
> index 951698a..7456b90 100644
> --- a/src/libinput.c
> +++ b/src/libinput.c
> @@ -510,7 +510,7 @@ libinput_add_fd(struct libinput *libinput,
> struct libinput_source *source;
> struct epoll_event ep;
>
> - source = malloc(sizeof *source);
> + source = zalloc(sizeof *source);
> if (!source)
> return NULL;
>
> --
> 2.1.0
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list