projects
/
proxmark3-svn
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5147ec6
)
FIX: CoverityScan 123465 - Resource leak
author
Alexis Green
<alexis@cessp.it>
Tue, 2 Aug 2016 20:57:44 +0000
(13:57 -0700)
committer
Alexis Green
<alexis@cessp.it>
Tue, 2 Aug 2016 20:57:44 +0000
(13:57 -0700)
client/cmdhflegic.c
patch
|
blob
|
blame
|
history
diff --git
a/client/cmdhflegic.c
b/client/cmdhflegic.c
index 731cead1097a5f80b0c56c104bfe81346b75b702..d55ea98d8907deccbe111a5a8d95e326425c2077 100644
(file)
--- a/
client/cmdhflegic.c
+++ b/
client/cmdhflegic.c
@@
-575,6
+575,9
@@
int CmdLegicCalcCrc8(const char *Cmd){
switch(param_getchar(Cmd, cmdp)) {
case 'b':
case 'B':
+ // it's possible for user to accidentally enter "b" parameter
+ // more than once - we have to clean previous malloc
+ if (data) free(data);
data = malloc(len);
if ( data == NULL ) {
PrintAndLog("Can't allocate memory. exiting");
Impressum
,
Datenschutz