Skip to content

Commit d1a5141

Browse files
kleht8SkyLothar
authored andcommitted
Fix memory leak (#65)
1 parent e5d4e00 commit d1a5141

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/resty/evp.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ function Cert.new(self, payload)
274274
if not public_key then
275275
return nil, err
276276
end
277+
278+
ffi.gc(public_key, _C.EVP_PKEY_free)
277279

278280
self.public_key = public_key
279281
return self, nil

0 commit comments

Comments
 (0)