projects
/
platform
/
upstream
/
neard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6d03fdb
)
nfctype2: Free cookie _after_ using dereferencing it
author
Samuel Ortiz
<sameo@linux.intel.com>
Wed, 24 Aug 2011 14:19:57 +0000
(16:19 +0200)
committer
Marcel Holtmann
<marcel@holtmann.org>
Fri, 21 Oct 2011 06:54:05 +0000
(23:54 -0700)
Thanks to Olivier Guiter for spotting this one.
plugins/nfctype2.c
patch
|
blob
|
history
diff --git
a/plugins/nfctype2.c
b/plugins/nfctype2.c
index
961c2ec
..
a29780a
100644
(file)
--- a/
plugins/nfctype2.c
+++ b/
plugins/nfctype2.c
@@
-196,11
+196,11
@@
static int meta_recv(uint8_t *resp, int length, void *data)
err = data_read(t2_tag);
out:
- g_free(cookie);
-
if (err < 0 && cookie->cb)
cookie->cb(cookie->adapter_idx, err);
+ g_free(cookie);
+
return err;
}