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:
8609e82
)
nfctool: Add a null pointer check in llcp_decode_cleanup
author
Thierry Escande
<thierry.escande@linux.intel.com>
Thu, 27 Jun 2013 10:04:00 +0000
(12:04 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 28 Jun 2013 08:06:42 +0000
(10:06 +0200)
g_hash_table_destroy raises an assert when called with a null pointer.
connection_hash can be NULL when sniffer_init() fails before calling
llcp_init().
tools/nfctool/llcp-decode.c
patch
|
blob
|
history
diff --git
a/tools/nfctool/llcp-decode.c
b/tools/nfctool/llcp-decode.c
index
6f8c59d
..
8afa067
100644
(file)
--- a/
tools/nfctool/llcp-decode.c
+++ b/
tools/nfctool/llcp-decode.c
@@
-612,7
+612,8
@@
void llcp_decode_cleanup(void)
snep_decode_cleanup();
- g_hash_table_destroy(connection_hash);
+ if (connection_hash)
+ g_hash_table_destroy(connection_hash);
}
int llcp_decode_init(void)