Fix some missing frees, null dereferences and missing initialisation picked up by clang-analyzer
This commit is contained in:
1 parent
5db2276602
commit
d2d6f80d11
11 files changed
+24
-15
No files matched your search
@@ -1091,6 +1091,7 @@ static int CmdSmartBruteforceSFI(const char *Cmd) {
|
||||
if (json_is_object(data) == false) {
|
||||
PrintAndLogEx(ERR, "\ndata %d is not an object\n", i + 1);
|
||||
json_decref(root);
|
||||
free(buf);
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
||||
@@ -1098,6 +1099,7 @@ static int CmdSmartBruteforceSFI(const char *Cmd) {
|
||||
if (json_is_string(jaid) == false) {
|
||||
PrintAndLogEx(ERR, "\nAID data [%d] is not a string", i + 1);
|
||||
json_decref(root);
|
||||
free(buf);
|
||||
return PM3_ESOFT;
|
||||
}
|
||||
|
||||
@@ -1459,5 +1461,3 @@ bool smart_select(bool verbose, smart_card_atr_t *atr) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user