[ofa-general] [PATCH] infiniband-diags/smpdump.c: Free allocated umad prior to exit
Hal Rosenstock
hnrose at comcast.net
Wed Feb 18 07:28:16 PST 2009
Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>
---
infiniband-diags/src/smpdump.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/infiniband-diags/src/smpdump.c b/infiniband-diags/src/smpdump.c
index 35fcb81..6731546 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;
}
--
1.5.6.4
More information about the general
mailing list