Merge pull request #125 from horazont/feature/fix-memleak

Fix memory leak in meth_extensions
This commit is contained in:
Bruno Silvestre 2019-01-10 10:03:25 -02:00 committed by GitHub
commit ef342a7cda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -23,6 +23,8 @@ while true do
assert( peer:dohandshake() ) assert( peer:dohandshake() )
--]] --]]
peer:getpeercertificate():extensions()
print(peer:receive("*l")) print(peer:receive("*l"))
peer:close() peer:close()
end end

View File

@ -372,6 +372,7 @@ int meth_extensions(lua_State* L)
break; break;
} }
} }
sk_GENERAL_NAME_free(values);
lua_pop(L, 1); /* ret[oid] */ lua_pop(L, 1); /* ret[oid] */
i++; /* Next extension */ i++; /* Next extension */
} }