Skip to content

Commit c23afe8

Browse files
author
Marcus Joachim Florentin
authored
Update MySQLStmt.swift : Fixing leaks
At line 756 the "scratch" reference is allocated but never free so it create a memory leaks for each myslq statement
1 parent 0f76488 commit c23afe8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/PerfectMySQL/MySQLStmt.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,7 @@ public final class MySQLStmt {
808808
}
809809
binds.advanced(by: i).initialize(to: bind)
810810
}
811+
free(scratch)
811812
mysql_stmt_bind_result(stmt.ptr, binds)
812813
}
813814

0 commit comments

Comments
 (0)