Fix (harmless) memory leak in the test harness.
Change-Id: Ia0daaaaf464cfa0e9d563d7f376ce2bb2e338685 Reviewed-on: https://boringssl-review.googlesource.com/1560 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
389e3f0daa
commit
e7bf281be1
@ -482,27 +482,30 @@ int main(int argc, char **argv) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
SSL_SESSION *session;
|
SSL_SESSION *session = NULL;
|
||||||
int ret = do_exchange(&session,
|
int ret = do_exchange(&session,
|
||||||
ssl_ctx, &config,
|
ssl_ctx, &config,
|
||||||
false /* is_resume */,
|
false /* is_resume */,
|
||||||
3 /* fd */, NULL /* session */);
|
3 /* fd */, NULL /* session */);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
return ret;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.resume) {
|
if (config.resume) {
|
||||||
int ret = do_exchange(NULL,
|
ret = do_exchange(NULL,
|
||||||
ssl_ctx, &config,
|
ssl_ctx, &config,
|
||||||
true /* is_resume */,
|
true /* is_resume */,
|
||||||
4 /* fd */,
|
4 /* fd */,
|
||||||
config.is_server ? NULL : session);
|
config.is_server ? NULL : session);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
return ret;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
|
|
||||||
|
out:
|
||||||
SSL_SESSION_free(session);
|
SSL_SESSION_free(session);
|
||||||
SSL_CTX_free(ssl_ctx);
|
SSL_CTX_free(ssl_ctx);
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user