projects
/
pgpool1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9294d55
)
Fix bug in del_prepared_list().
author
Yoshiyuki Asaba
<y-asaba at pgfoundry.org>
Fri, 28 Apr 2006 07:08:01 +0000
(07:08 +0000)
committer
Yoshiyuki Asaba
<y-asaba at pgfoundry.org>
Fri, 28 Apr 2006 07:08:01 +0000
(07:08 +0000)
Pgpool dumped core file when clients sends Close command.
pool_process_query.c
patch
|
blob
|
blame
|
history
diff --git
a/pool_process_query.c
b/pool_process_query.c
index 30e8ba5383caea6299584c5d28884e46867902cb..54da60f709cd4da6d5d77f6128197d19303615ec 100644
(file)
--- a/
pool_process_query.c
+++ b/
pool_process_query.c
@@
-3140,13
+3140,12
@@
static void del_prepared_list(PreparedStatementList *p, char *name)
return;
free(p->stmt_list[i]);
- if (i == p->cnt - 1)
- p->cnt--;
- else
+ if (i != p->cnt - 1)
{
- memmove(
p->stmt_list[i], p->stmt_list[i+1], sizeof(char *) * (p->cnt - i - 1));
-
p->cnt--
;
+ memmove(
&p->stmt_list[i], &p->stmt_list[i+1],
+
sizeof(char *) * (p->cnt - i - 1))
;
}
+ p->cnt--;
}
static void reset_prepared_list(PreparedStatementList *p)