projects
/
users
/
rhaas
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46c9f5d
)
ecpg: Fix rare memory leaks
author
Peter Eisentraut
<peter_e@gmx.net>
Thu, 8 Mar 2012 20:21:12 +0000
(22:21 +0200)
committer
Peter Eisentraut
<peter_e@gmx.net>
Sat, 10 Mar 2012 23:01:22 +0000
(
01:01
+0200)
found by Coverity
src/interfaces/ecpg/ecpglib/execute.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/ecpg/ecpglib/execute.c
b/src/interfaces/ecpg/ecpglib/execute.c
index 2fb54392c9e80f12086d46e313143111215aec11..3f1478694de91ba0f91519948bf5c87fc2d7349e 100644
(file)
--- a/
src/interfaces/ecpg/ecpglib/execute.c
+++ b/
src/interfaces/ecpg/ecpglib/execute.c
@@
-1776,6
+1776,7
@@
ECPGdo(const int lineno, const int compat, const int force_indicator, const char
{
setlocale(LC_NUMERIC, oldlocale);
ecpg_free(oldlocale);
+ free_statement(stmt);
va_end(args);
return (false);
}
@@
-1807,6
+1808,7
@@
ECPGdo(const int lineno, const int compat, const int force_indicator, const char
ecpg_raise(lineno, ECPG_INVALID_STMT, ECPG_SQLSTATE_INVALID_SQL_STATEMENT_NAME, stmt->command);
setlocale(LC_NUMERIC, oldlocale);
ecpg_free(oldlocale);
+ free_statement(stmt);
va_end(args);
return (false);
}