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:
e3311bb
)
nfctype2: Fix possible memory leak in meta_recv
author
Wiktor Lawski
<wiktor.lawski@tieto.com>
Mon, 10 Sep 2012 07:43:25 +0000
(09:43 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Mon, 10 Sep 2012 08:41:46 +0000
(10:41 +0200)
Tag was not freed when data_read failed.
plugins/nfctype2.c
patch
|
blob
|
history
diff --git
a/plugins/nfctype2.c
b/plugins/nfctype2.c
index
09954db
..
dc178ca
100644
(file)
--- a/
plugins/nfctype2.c
+++ b/
plugins/nfctype2.c
@@
-248,12
+248,15
@@
static int meta_recv(uint8_t *resp, int length, void *data)
err = data_read(t2_tag);
if (err < 0)
- goto out;
+ goto out
_tag
;
t2_cookie_release(cookie);
return 0;
+out_tag:
+ g_free(t2_tag);
+
out:
if (err < 0 && cookie->cb)
cookie->cb(cookie->adapter_idx, cookie->target_idx, err);