test-https: Fix memory leaks in TLS processing

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2011-11-27 18:33:11 +02:00
parent e770c497eb
commit b32a8d1dfe

View file

@ -131,6 +131,8 @@ static int https_client(int s, const char *path)
if (in == NULL) if (in == NULL)
goto done; goto done;
} }
wpabuf_free(out);
out = NULL;
wpa_printf(MSG_INFO, "TLS connection established"); wpa_printf(MSG_INFO, "TLS connection established");
if (appl) if (appl)
@ -154,6 +156,8 @@ static int https_client(int s, const char *path)
wpa_printf(MSG_ERROR, "send: %s", strerror(errno)); wpa_printf(MSG_ERROR, "send: %s", strerror(errno));
goto done; goto done;
} }
wpabuf_free(out);
out = NULL;
wpa_printf(MSG_INFO, "Reading HTTP response"); wpa_printf(MSG_INFO, "Reading HTTP response");
for (;;) { for (;;) {