[ofa-general] [PATCH 1/6] [DAPL v1] fix memory leak

Patrick Marchand Latifi patrick.latifi at qlogic.com
Tue Feb 19 03:17:09 PST 2008


Fix memory leak.

Signed-off-by: Patrick Marchand Latifi <patrick.latifi at qlogic.com>
---

 test/dapltest/cmd/dapl_netaddr.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/test/dapltest/cmd/dapl_netaddr.c b/test/dapltest/cmd/dapl_netaddr.c
index 0b16303..a306335 100644
--- a/test/dapltest/cmd/dapl_netaddr.c
+++ b/test/dapltest/cmd/dapl_netaddr.c
@@ -137,6 +137,7 @@ DT_NetAddrLookupHostAddress (DAT_IA_ADDRESS_PTR	to_netaddr,
 		    inet_ntoa(((struct sockaddr_in *)target->ai_addr)->sin_addr));
 
     *to_netaddr = * ((DAT_IA_ADDRESS_PTR) target->ai_addr);
+    freeaddrinfo(target);
 
     return ( DAT_TRUE );
 }




More information about the general mailing list