projects
/
platform
/
core
/
system
/
peripheral-bus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b94550
)
Fix a memleak
42/249342/1
accepted/tizen_6.0_unified
tizen_6.0
accepted/tizen/6.0/unified/20201222.015615
submit/tizen_6.0/20201218.134248
author
Michal Bloch
<m.bloch@samsung.com>
Mon, 7 Dec 2020 21:09:12 +0000
(22:09 +0100)
committer
Karol Lewandowski
<k.lewandowsk@samsung.com>
Thu, 10 Dec 2020 09:43:10 +0000
(09:43 +0000)
Change-Id: I8387f40aa78f329b3c2f3293765e1f38ae0a6447
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
(cherry picked from commit
394f4ab4498610ac3b8112c7a5ba7b42edc60933
)
src/util/peripheral_privilege.c
patch
|
blob
|
history
diff --git
a/src/util/peripheral_privilege.c
b/src/util/peripheral_privilege.c
index
335f9b9
..
443964b
100644
(file)
--- a/
src/util/peripheral_privilege.c
+++ b/
src/util/peripheral_privilege.c
@@
-82,21
+82,23
@@
int peripheral_privilege_check(GDBusMethodInvocation *invocation, GDBusConnectio
if (!session || !client || !user) {
_E("Failed to get client info");
- return -1;
+ ret = -1;
+ goto cleanup;
}
ret = cynara_check(__cynara, client, session, user, PERIPHERAL_PRIVILEGE);
if (ret != CYNARA_API_ACCESS_ALLOWED) {
_E("Failed to check privilege");
- g_free(session);
- g_free(client);
- g_free(user);
- return -EACCES;
+ ret = -EACCES;
+ goto cleanup;
}
+ ret = 0;
+
+cleanup:
g_free(session);
g_free(client);
g_free(user);
- return
0
;
+ return
ret
;
}