From 42dd970de80f4feaa6bb537e456f360891a6f75a Mon Sep 17 00:00:00 2001 From: Djalal Harouni Date: Wed, 15 Jan 2014 18:17:08 +0100 Subject: [PATCH] kdbus, endpoint: abort if device_register fails If device_register() fails then jump to exit to clean things up and return. Signed-off-by: Djalal Harouni --- endpoint.c | 1 + 1 file changed, 1 insertion(+) diff --git a/endpoint.c b/endpoint.c index 5534dba..64f3c32 100644 --- a/endpoint.c +++ b/endpoint.c @@ -206,6 +206,7 @@ int kdbus_ep_new(struct kdbus_bus *bus, struct kdbus_ns *ns, const char *name, if (ret < 0) { put_device(e->dev); e->dev = NULL; + goto exit; } /* install policy */ -- 2.34.1