Skip to content

Commit a0ec558

Browse files
authored
Fix a memory leakage in getRowid (#406)
1 parent b5e671b commit a0ec558

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

statement.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ func (stmt *Stmt) getRowid() (string, error) {
673673
if err != nil {
674674
return "", err
675675
}
676+
defer C.OCIDescriptorFree(*rowidP, C.OCI_DTYPE_ROWID)
676677

677678
// OCI_ATTR_ROWID returns the ROWID descriptor allocated with OCIDescriptorAlloc()
678679
_, err = stmt.ociAttrGet(*rowidP, C.OCI_ATTR_ROWID)

0 commit comments

Comments
 (0)