Fix some missing frees, null dereferences and missing initialisation picked up by clang-analyzer
This commit is contained in:
1 parent
5db2276602
commit
d2d6f80d11
11 files changed
+24
-15
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user