mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-07 00:46:17 +08:00
remove the line ENGINE_free. In this function, the engine is not newed, so there should not be a free here. This line can cause nil pointer dereference when called.
This commit is contained in:
@@ -95,7 +95,6 @@ func NewEngineByName(name string) (*Engine, error) {
|
||||
ret := &Engine{eng}
|
||||
runtime.SetFinalizer(ret, func(ret *Engine) {
|
||||
C.ENGINE_finish(ret.engine)
|
||||
C.ENGINE_free(ret.engine)
|
||||
})
|
||||
if 1 != C.ENGINE_init(eng) {
|
||||
return nil, GetErrors()
|
||||
|
||||
Reference in New Issue
Block a user