[ofa-general] ***SPAM*** [PATCHv2] infiniband-diags/smpdump.c: Release umad resources on exit
Hal Rosenstock
hnrose at comcast.net
Wed Feb 18 09:19:32 PST 2009
Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>
---
diff --git a/infiniband-diags/src/smpdump.c b/infiniband-diags/src/smpdump.c
index 6c7f84c..414975c 100644
--- a/infiniband-diags/src/smpdump.c
+++ b/infiniband-diags/src/smpdump.c
@@ -289,7 +289,7 @@ int main(int argc, char *argv[])
xdump(stdout, 0, smp->data, 64);
if (smp->status)
fprintf(stdout, "SMP status: 0x%x\n", ntohs(smp->status));
- return 0;
+ goto exit;
}
desc = smp->data;
@@ -301,5 +301,8 @@ int main(int argc, char *argv[])
putchar('\n');
if (smp->status)
fprintf(stdout, "SMP status: 0x%x\n", ntohs(smp->status));
+
+exit:
+ umad_free(umad);
return 0;
}
More information about the general
mailing list