More coverity fixes

This commit is contained in:
Martin Holst Swende 2014-10-30 21:49:18 +01:00
commit ca4714cd23
6 changed files with 20 additions and 7 deletions

View file

@ -192,6 +192,7 @@ void printarr_human_readable(char * title, uint8_t* arr, int len)
cx += snprintf(output+cx,outsize-cx, "%02x ",*(arr+i));
}
prnlog(output);
free(output);
}
//-----------------------------

View file

@ -35,6 +35,7 @@ int saveFile(const char *preferredName, const char *suffix, const void* data, si
FILE *fileHandle=fopen(fileName,"wb");
if(!fileHandle) {
prnlog("Failed to write to file '%s'", fileName);
free(fileName);
return 1;
}
fwrite(data, 1, datalen, fileHandle);