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:
beb7d3b
)
nfctype1: Fix possible memory leak in meta_recv
author
Wiktor Lawski
<wiktor.lawski@tieto.com>
Wed, 19 Sep 2012 13:20:42 +0000
(15:20 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 21 Sep 2012 07:20:38 +0000
(09:20 +0200)
If read_dynamic_tag returned an error or neard does not support specified
response, memory allocated for t1_tag should also be freed.
plugins/nfctype1.c
patch
|
blob
|
history
diff --git
a/plugins/nfctype1.c
b/plugins/nfctype1.c
index
b1c1027
..
7fb4e0c
100644
(file)
--- a/
plugins/nfctype1.c
+++ b/
plugins/nfctype1.c
@@
-336,6
+336,9
@@
static int meta_recv(uint8_t *resp, int length, void *data)
err = -EOPNOTSUPP;
}
+ if (err < 0)
+ g_free(t1_tag);
+
out_err:
DBG("err %d", err);