mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-24 16:14:59 +08:00
cppchecker fix, realloc should already freed it
This commit is contained in:
parent
2c73337bde
commit
56b4a480cd
1 changed files with 2 additions and 2 deletions
|
@ -106,7 +106,7 @@ int searchHomeFilePath(char **foundpath, const char *subdir, const char *filenam
|
||||||
pathlen += strlen(subdir);
|
pathlen += strlen(subdir);
|
||||||
char *tmp = realloc(path, pathlen * sizeof(char));
|
char *tmp = realloc(path, pathlen * sizeof(char));
|
||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
free(path);
|
//free(path);
|
||||||
return PM3_EMALLOC;
|
return PM3_EMALLOC;
|
||||||
}
|
}
|
||||||
path = tmp;
|
path = tmp;
|
||||||
|
@ -146,7 +146,7 @@ int searchHomeFilePath(char **foundpath, const char *subdir, const char *filenam
|
||||||
pathlen += strlen(filename);
|
pathlen += strlen(filename);
|
||||||
char *tmp = realloc(path, pathlen * sizeof(char));
|
char *tmp = realloc(path, pathlen * sizeof(char));
|
||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
free(path);
|
//free(path);
|
||||||
return PM3_EMALLOC;
|
return PM3_EMALLOC;
|
||||||
}
|
}
|
||||||
path = tmp;
|
path = tmp;
|
||||||
|
|
Loading…
Reference in a new issue