Skip to content

Commit

Permalink
Fix a memory leakage in getRowid (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
fishpadak authored Oct 29, 2020
1 parent b5e671b commit a0ec558
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions statement.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ func (stmt *Stmt) getRowid() (string, error) {
if err != nil {
return "", err
}
defer C.OCIDescriptorFree(*rowidP, C.OCI_DTYPE_ROWID)

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

0 comments on commit a0ec558

Please sign in to comment.