Skip to content

Commit e69f7ab

Browse files
committed
* Fixed nil pointer dereference panic on failed ydb.Open
1 parent d6b0468 commit e69f7ab

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
* Added ip discovery. Server can show own ip address and target hostname in the ListEndpoint message. These fields are used to bypass DNS resolving.
1+
* Fixed nil pointer dereference panic on failed `ydb.Open`
2+
* Added ip discovery. Server can show own ip address and target hostname in the ListEndpoint message. These fields are used to bypass DNS resolving.
23

34
## v3.81.0
45
* Added error ErrMessagesPutToInternalQueueBeforeError to topic writer

driver.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,9 @@ func Open(ctx context.Context, dsn string, opts ...Option) (_ *Driver, _ error)
274274
}()
275275

276276
if err = d.connect(ctx); err != nil {
277-
_ = d.pool.Release(ctx)
277+
if d.pool != nil {
278+
_ = d.pool.Release(ctx)
279+
}
278280

279281
return nil, xerrors.WithStackTrace(err)
280282
}

0 commit comments

Comments
 (0)