From 6685d1930162b71d04fc3d6796b21a28dc025ab4 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Tue, 9 Oct 2012 18:46:22 +0100 Subject: [PATCH] connection: Add missing free from error path On the error codepath that errors out on ENOMEM we should free the allocated closure. Signed-off-by: Rob Bradford --- 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; -- 2.7.4