From 59bae7463a1a9680b7a8bd3fff1271f6c2b823c0 Mon Sep 17 00:00:00 2001 From: Nishant Chaprana Date: Tue, 23 Jun 2015 18:04:40 +0530 Subject: [PATCH] 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 --- 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 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 */