Code Review
/
src
/
app-framework-binder.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
ece754d
)
avoid to free the same pointer
author
José Bollo
<jose.bollo@iot.bzh>
Tue, 24 May 2016 15:20:45 +0000
(17:20 +0200)
committer
José Bollo
<jose.bollo@iot.bzh>
Tue, 24 May 2016 15:20:45 +0000
(17:20 +0200)
Change-Id: I0cf860c42046dd3819416688db24a2cd51c3f3aa
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/session.c
patch
|
blob
|
history
diff --git
a/src/session.c
b/src/session.c
index
e847a6d
..
16dc836
100644
(file)
--- a/
src/session.c
+++ b/
src/session.c
@@
-463,6
+463,6
@@
void ctxClientValueSet(struct AFB_clientCtx *clientCtx, int index, void *value,
assert(index < sessions.apicount);
prev = clientCtx->values[index];
clientCtx->values[index] = (struct client_value){.value = value, .free_value = free_value};
- if (prev.value !=
NULL
&& prev.free_value != NULL)
+ if (prev.value !=
NULL && prev.value != value
&& prev.free_value != NULL)
prev.free_value(prev.value);
}