Skip to content

Commit

Permalink
Fix memory leak in ExpandedSQL (#738)
Browse files Browse the repository at this point in the history
Fixes: #733
  • Loading branch information
gjrtimmer committed Aug 22, 2019
1 parent e3726ad commit d3c6909
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sqlite3_trace.go
Expand Up @@ -89,6 +89,7 @@ func fillExpandedSQL(info *TraceInfo, db *C.sqlite3, pStmt unsafe.Pointer) {
}

expSQLiteCStr := C.sqlite3_expanded_sql((*C.sqlite3_stmt)(pStmt))
defer C.sqlite3_free(unsafe.Pointer(expSQLiteCStr))
if expSQLiteCStr == nil {
fillDBError(&info.DBError, db)
return
Expand Down

0 comments on commit d3c6909

Please sign in to comment.