aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m
diff options
context:
space:
mode:
authorStuart Connolly <stuart02@gmail.com>2014-01-26 14:50:33 +0000
committerStuart Connolly <stuart02@gmail.com>2014-01-26 14:50:33 +0000
commit96872fc9563c747ef66a1535a8db8b07439daa13 (patch)
tree4ccdace873f84cfabb3365c0bfd268199f4df3a0 /Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m
parent449700e91b25ca4324d221f92c39dc064721f4ea (diff)
downloadsequelpro-96872fc9563c747ef66a1535a8db8b07439daa13.tar.gz
sequelpro-96872fc9563c747ef66a1535a8db8b07439daa13.tar.bz2
sequelpro-96872fc9563c747ef66a1535a8db8b07439daa13.zip
Fix PostgresKit memory leaks.
Diffstat (limited to 'Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m')
-rw-r--r--Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m b/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m
index 7e0aa18a..909e5451 100644
--- a/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m
+++ b/Frameworks/PostgresKit/Source/PGPostgresConnectionQueryExecution.m
@@ -219,7 +219,11 @@ PGQueryParamData;
if (![statement name]) {
BOOL prepareResult = [self _prepare:statement num:paramData->paramNum types:paramData->paramTypes];
- if (!prepareResult || ![statement name]) return nil;
+ if (!prepareResult || ![statement name]) {
+ [self _destroyParamDataStructure:paramData];
+
+ return nil;
+ }
}
pgResult = PQexecPrepared(_connection,