From f8b2968e79d7f13cbe7faece4ac41bf7ef7e56a4 Mon Sep 17 00:00:00 2001 From: Bruno Silvestre Date: Tue, 16 Apr 2019 10:48:15 -0300 Subject: [PATCH] Declare variable "key" before use it. --- src/context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/context.c b/src/context.c index f4401d6..6a19f9f 100644 --- a/src/context.c +++ b/src/context.c @@ -567,12 +567,13 @@ static int set_dhparam(lua_State *L) static int set_curve(lua_State *L) { long ret; + EC_KEY *key = NULL; SSL_CTX *ctx = lsec_checkcontext(L, 1); const char *str = luaL_checkstring(L, 2); SSL_CTX_set_options(ctx, SSL_OP_SINGLE_ECDH_USE); - EC_KEY *key = lsec_find_ec_key(L, str); + key = lsec_find_ec_key(L, str); if (!key) { lua_pushboolean(L, 0);