projects
/
platform
/
core
/
system
/
kdbus-bus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0638b2
)
endpoint: free the policy_db on error path
author
Djalal Harouni
<tixxdz@opendz.org>
Sun, 23 Mar 2014 22:06:35 +0000
(23:06 +0100)
committer
Kay Sievers
<kay@vrfy.org>
Mon, 24 Mar 2014 02:46:41 +0000
(
03:46
+0100)
Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
endpoint.c
patch
|
blob
|
history
diff --git
a/endpoint.c
b/endpoint.c
index 465ae31ec7767c0dc9fb879f2d87ea84a54a3101..5afabf9d857cddb2e5ee4019777cb7c910e43697 100644
(file)
--- a/
endpoint.c
+++ b/
endpoint.c
@@
-236,7
+236,7
@@
int kdbus_ep_new(struct kdbus_bus *bus, const char *name,
if (bus->disconnected) {
mutex_unlock(&bus->lock);
ret = -ESHUTDOWN;
- goto exit_
dev_unregister
;
+ goto exit_
policy_db_free
;
}
e->id = ++bus->ep_seq_last;
e->bus = kdbus_bus_ref(bus);
@@
-247,6
+247,9
@@
int kdbus_ep_new(struct kdbus_bus *bus, const char *name,
*ep = e;
return 0;
+exit_policy_db_free:
+ if (policy)
+ kdbus_policy_db_free(e->policy_db);
exit_dev_unregister:
device_unregister(e->dev);
exit_idr: