diff options
author | Raquel Medina <raquel.medina@konsulko.com> | 2019-09-06 18:22:47 +0200 |
---|---|---|
committer | raquel medina <raquel.medina@konsulko.com> | 2019-09-13 10:34:00 +0000 |
commit | 57cf5aa7d13c1cf3634eb88bbcf291d9f9973e8c (patch) | |
tree | 61f6996e0edfed6d18917f7276d8f1c150ca409f /binding/afm-nfc-binding.c | |
parent | a8400563edde51db455bf04781b74e4fdda020c1 (diff) |
re-balance refcount for jresphalibut_8.0.6halibut_8.0.5halibut_8.0.4halibut_8.0.3halibut_8.0.2halibut/8.0.6halibut/8.0.5halibut/8.0.4halibut/8.0.3halibut/8.0.28.0.68.0.58.0.48.0.38.0.2halibut
afb_event_push most recent implementation calls
'json_object_put', thus affecting the reference
count for jresp in agl-service-nfc binding.
A call to 'json_object_get' has been added to
keep jresp available for the binding.
SPEC-2800
Signed-off-by: Raquel Medina <raquel.medina@konsulko.com>
Change-Id: I6c9f9df8152918dcd70452465352a848eb195f94
(cherry picked from commit a1a9d26d5b1ffc06f57d5bb61cf0b5012a02084a)
Diffstat (limited to 'binding/afm-nfc-binding.c')
-rw-r--r-- | binding/afm-nfc-binding.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/binding/afm-nfc-binding.c b/binding/afm-nfc-binding.c index 5b046f2..72f219f 100644 --- a/binding/afm-nfc-binding.c +++ b/binding/afm-nfc-binding.c @@ -217,6 +217,7 @@ static void record_found(const char *tag_name, void *ptr) pthread_mutex_lock(&mutex); data->jresp = jresp; json_object_object_add(jresp, "uid", json_object_new_string(uid)); + json_object_get(jresp); /* afb_event_push invokes json_object_put */ pthread_mutex_unlock(&mutex); afb_event_push(presence_event, jresp); |