Discussion:
[Ipmitool-devel] tracker:3611306 [PATCH] Fix bug in plugins/lan/lan.c introduced in CVS revision 1.70.
Dan Gora
2013-04-18 21:09:35 UTC
Permalink
Fixed bug introduced in CVS revision 1.15 of lib/ipmi_tsol.c where
an error case was missing braces, so it would always fail.
---
ipmitool/lib/ipmi_tsol.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ipmitool/lib/ipmi_tsol.c b/ipmitool/lib/ipmi_tsol.c
index 9beb84b..62e043a 100644
--- a/ipmitool/lib/ipmi_tsol.c
+++ b/ipmitool/lib/ipmi_tsol.c
@@ -456,9 +456,10 @@ ipmi_tsol_main(struct ipmi_intf * intf, int argc,
char ** argv)
*/
if (recvip == NULL) {
result = intf->open(intf); /* must connect first */
- if (result < 0)
+ if (result < 0) {
close(fd_socket);
return -1;
+ }

mylen = sizeof(myaddr);
if (getsockname(intf->fd, (struct sockaddr *)&myaddr,
&mylen) < 0) {

Loading...