From: Rob Bradford <[email protected]>

On the error codepath that errors out on ENOMEM we should free the allocated
closure.

Signed-off-by: Rob Bradford <[email protected]>
---
 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
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to