diff options
author | Adriaan de Jong <dejong@fox-it.com> | 2011-08-03 20:16:01 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2011-10-22 18:02:08 +0200 |
commit | b26341cdb7e58a00c0d2ab5e5b1e3ad59c0a60b7 (patch) | |
tree | 80e58c7a384a7218be49d405426c198150d18ae4 | |
parent | c94eff3c2fe2f1ae85159294ce89f80d676f8c36 (diff) | |
download | openvpn-b26341cdb7e58a00c0d2ab5e5b1e3ad59c0a60b7.tar.gz openvpn-b26341cdb7e58a00c0d2ab5e5b1e3ad59c0a60b7.tar.xz openvpn-b26341cdb7e58a00c0d2ab5e5b1e3ad59c0a60b7.zip |
Moved gc_new and gc_free to begin end of function
As a safety measure against future modifications
Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r-- | ssl_verify.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ssl_verify.c b/ssl_verify.c index 0ce5dda..75322d7 100644 --- a/ssl_verify.c +++ b/ssl_verify.c @@ -500,15 +500,14 @@ verify_cert_call_command(const char *verify_command, struct env_set *es, int cert_depth, x509_cert_t *cert, char *subject, const char *verify_export_cert) { const char *tmp_file = NULL; - struct gc_arena gc; int ret; + struct gc_arena gc = gc_new(); struct argv argv = argv_new (); setenv_str (es, "script_type", "tls-verify"); if (verify_export_cert) { - gc = gc_new(); if ((tmp_file=verify_cert_export_cert(cert, verify_export_cert, &gc))) { setenv_str(es, "peer_cert", tmp_file); @@ -524,9 +523,9 @@ verify_cert_call_command(const char *verify_command, struct env_set *es, { if (tmp_file) delete_file(tmp_file); - gc_free(&gc); } + gc_free(&gc); argv_reset (&argv); if (ret) |