HS 2.0R2: Fix memory leak on error path in hs20-osu-client
authorNishant Chaprana <n.chaprana@samsung.com>
Tue, 23 Jun 2015 12:34:40 +0000 (18:04 +0530)
committerJouni Malinen <j@w1.fi>
Tue, 23 Jun 2015 15:51:41 +0000 (18:51 +0300)
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 <n.chaprana@samsung.com>
hs20/client/osu_client.c

index 478d940..0315f7b 100644 (file)
@@ -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 */