projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7253ebd
)
Added missing braces to prevent a segfault after usage of an undeclared cursor.
author
Michael Meskes
<
[email protected]
>
Mon, 26 Jun 2006 14:12:42 +0000
(14:12 +0000)
committer
Michael Meskes
<
[email protected]
>
Mon, 26 Jun 2006 14:12:42 +0000
(14:12 +0000)
src/interfaces/ecpg/preproc/preproc.y
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/ecpg/preproc/preproc.y
b/src/interfaces/ecpg/preproc/preproc.y
index cbf18b6f538557c9ce2033f1eda902b96cb38c10..320249e15d2d8cf9b3eda1076c18069ea8702c1e 100644
(file)
--- a/
src/interfaces/ecpg/preproc/preproc.y
+++ b/
src/interfaces/ecpg/preproc/preproc.y
@@
-292,6
+292,7
@@
add_additional_variables(char *name, bool insert)
mmerror(PARSE_ERROR, ET_ERROR, "trying to access an undeclared cursor %s\n", name);
return NULL;
}
+
if (insert)
{
/* add all those input variables that were given earlier
@@
-831,8
+832,10
@@
stmt: AlterDatabaseStmt { output_statement($1, 0, connection); }
struct cursor *ptr;
if ((ptr = add_additional_variables($1, true)) != NULL)
+ {
output_statement(mm_strdup(ptr->command), 0, ptr->connection ? mm_strdup(ptr->connection) : NULL);
- ptr->opened = true;
+ ptr->opened = true;
+ }
}
| ECPGPrepare
{