projects
/
platform
/
core
/
api
/
usb-host.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd8c67b
)
Fix: call release() when suitable
author
Krzysztof Opasiak
<k.opasiak@samsung.com>
Wed, 1 Jul 2015 18:58:19 +0000
(20:58 +0200)
committer
Stanislaw Wadas
<s.wadas@samsung.com>
Fri, 3 Jul 2015 14:55:35 +0000
(16:55 +0200)
Change-Id: I56a065b085d0fcb472a314f8796e177751f9c1d9
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
include/uref.h
patch
|
blob
|
history
diff --git
a/include/uref.h
b/include/uref.h
index d7b09a4948d087205e1de7dec1b735a65208c189..d9f552243255686c5f11a50347b689a1b14aedbd 100644
(file)
--- a/
include/uref.h
+++ b/
include/uref.h
@@
-51,6
+51,8
@@
static inline void uref_sub(struct uref *uref, unsigned count)
{
assert(uref->refcnt >= count);
uref->refcnt -= count;
+ if (uref->refcnt == 0 && uref->release)
+ uref->release(uref);
}
static inline void uref_put(struct uref *uref)