coverity fix 286920
This commit is contained in:
@@ -122,6 +122,7 @@ int preferences_save(void) {
|
|||||||
char* backupFilename = (char *)calloc(fnLen, sizeof(uint8_t));
|
char* backupFilename = (char *)calloc(fnLen, sizeof(uint8_t));
|
||||||
if (backupFilename == NULL) {
|
if (backupFilename == NULL) {
|
||||||
PrintAndLogEx(ERR, "failed to allocate memory");
|
PrintAndLogEx(ERR, "failed to allocate memory");
|
||||||
|
free(fn);
|
||||||
return PM3_EMALLOC;
|
return PM3_EMALLOC;
|
||||||
}
|
}
|
||||||
snprintf(backupFilename, fnLen, "%s.bak", fn);
|
snprintf(backupFilename, fnLen, "%s.bak", fn);
|
||||||
|
|||||||
Reference in New Issue
Block a user