[PATCH] [Fixed Memory leak] fqdn is not freed before return

Nishant Chaprana n.chaprana at samsung.com
Tue Jun 23 08:34:40 EDT 2015


Signed-off-by: Nishant Chaprana <n.chaprana at samsung.com>
---
 hs20/client/osu_client.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hs20/client/osu_client.c b/hs20/client/osu_client.c
index 478d940..0315f7b 100644
--- a/hs20/client/osu_client.c
+++ b/hs20/client/osu_client.c
@@ -542,6 +542,7 @@ int hs20_add_pps_mo(struct hs20_osu_client *ctx, const char *uri,
 				   uri);
 			write_result(ctx, "Unsupported location for addMO to "
 				     "add PPS MO (extra directory): '%s'", uri);
+			free(fqdn);
 			return -1;
 		}
 		*pos = '\0'; /* remove trailing slash and PPS node name */
-- 
1.9.1



More information about the HostAP mailing list