Hi,

I'm co-maintainer/-bugowner of ipmitool within SUSE.

I was playing around with the static code analysis tool "cppcheck" and
let it loose on the ipmitool sources.

"Cppcheck" reported two errors in lib/ipmi_hpmfwupg.c:

1) In line 1401 it complained about a "resource leak": the file
pImageFile is not closed. This would be trivial to fix: just insert
fclose(pImageFile) just before the "return".

2) In line 2307 it complained about uninitialized variables (timeoutSec1
and timeoutSec2) which are indeed used uninitialized if rc !=
HPMFWUPG_SUCCESS in the condition of the if-statement above the while-loop.
While pondering over this, I was wondering if there was a bigger
problem: that the while-loop should actually be inside the body of the
if-statement and not outside, as it is now!

Can you please look at the latter? I would prepare a pull request fixing
both issues but would like to see the fix for the second issue.

Thanks,

Josef



_______________________________________________
Ipmitool-devel mailing list
Ipmitool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipmitool-devel

Reply via email to