From a68bd742c068924950d17e2c5122fb9e710360ed Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Thu, 13 Nov 2014 18:14:39 +0530 Subject: [PATCH] greybus: connection: free resources properly on failures Signed-off-by: Viresh Kumar Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/connection.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 5373f44..32f1ec5 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -199,6 +199,7 @@ struct gb_connection *gb_connection_create(struct gb_interface *interface, gb_connection_hd_cport_id_free(connection); gb_protocol_put(connection->protocol); put_device(&connection->dev); + kfree(connection); return NULL; } -- 2.7.4