mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-03 22:53:58 +08:00
fix: coverity 290109 resouce leak
This commit is contained in:
parent
c3ab0b6527
commit
a62199ac0f
1 changed files with 2 additions and 0 deletions
|
@ -169,6 +169,7 @@ static int CmdScriptRun(const char *Cmd) {
|
|||
char *extension_chk;
|
||||
extension_chk = str_dup(preferredName);
|
||||
str_lower(extension_chk);
|
||||
|
||||
pm3_scriptfile_t ext = PM3_UNSPECIFIED;
|
||||
if (str_endswith(extension_chk, ".lua")) {
|
||||
ext = PM3_LUA;
|
||||
|
@ -180,6 +181,7 @@ static int CmdScriptRun(const char *Cmd) {
|
|||
ext = PM3_PY;
|
||||
}
|
||||
#endif
|
||||
free(extension_chk);
|
||||
|
||||
char *script_path = NULL;
|
||||
if (((ext == PM3_LUA) || (ext == PM3_UNSPECIFIED)) && (searchFile(&script_path, LUA_SCRIPTS_SUBDIR, preferredName, ".lua", true) == PM3_SUCCESS)) {
|
||||
|
|
Loading…
Reference in a new issue