From: Nishant Chaprana Date: Tue, 23 Jun 2015 12:34:40 +0000 (+0530) Subject: HS 2.0R2: Fix memory leak on error path in hs20-osu-client X-Git-Tag: hostap_2_5~545 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59bae7463a1a9680b7a8bd3fff1271f6c2b823c0;p=thirdparty%2Fhostap.git HS 2.0R2: Fix memory leak on error path in hs20-osu-client fqdn was not freed before return in case the server uses an unsupported location for the PPS MO in the addMO command. Signed-off-by: Nishant Chaprana --- diff --git a/hs20/client/osu_client.c b/hs20/client/osu_client.c index 478d940e2..0315f7b75 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 */