Fix some missing frees, null dereferences and missing initialisation picked up by clang-analyzer

This commit is contained in:
nvx committed 2024-01-16 00:22:53 +10:00
1 parent 5db2276602
commit d2d6f80d11
11 files changed
+24 -15

No files matched your search

+1 -2
View File
@@ -1853,7 +1853,7 @@ static int CmdT55xxReadTrace(const char *Cmd) {
ct = localtime_r(&now, &tm_buf);
#endif
if (data.year > ct->tm_year - 110)
if (ct != NULL && (data.year > ct->tm_year - 110))
data.year += 2000;
else
data.year += 2010;
@@ -4419,4 +4419,3 @@ int CmdLFT55XX(const char *Cmd) {
clearCommandBuffer();
return CmdsParse(CommandTable, Cmd);
}