[PATCH 2/2] connection: Add missing free from error path
Kristian Høgsberg
hoegsberg at gmail.com
Tue Oct 9 20:04:01 PDT 2012
On Tue, Oct 09, 2012 at 06:46:22PM +0100, Rob Bradford wrote:
> From: Rob Bradford <rob at linux.intel.com>
>
> On the error codepath that errors out on ENOMEM we should free the allocated
> closure.
Yes, that's better.
Kristian
> Signed-off-by: Rob Bradford <rob at linux.intel.com>
> ---
> src/connection.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/connection.c b/src/connection.c
> index dbe0fa9..8f4b44c 100644
> --- a/src/connection.c
> +++ b/src/connection.c
> @@ -611,6 +611,7 @@ err:
> printf("request too big to marshal, maximum size is %zu\n",
> sizeof closure->buffer);
> errno = ENOMEM;
> + free(closure);
>
> return NULL;
>
> --
> 1.7.11.2
>
> _______________________________________________
> 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