1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

Fix incorrect cleanup of tsquery in ts_rewrite(). Per bug #4933 by

Aaron Marcuse-Kubitza <aaronmk@blackducksoftware.com>
This commit is contained in:
Teodor Sigaev
2009-07-28 09:33:09 +00:00
parent 4b284aff65
commit a142498e76

View File

@ -174,12 +174,12 @@ dropvoidsubtree(QTNode * root)
root->nchild = j; root->nchild = j;
if (root->valnode->val == (int4) '!' && root->nchild == 0) if (root->nchild == 0)
{ {
QTNFree(root); QTNFree(root);
root = NULL; root = NULL;
} }
else if (root->nchild == 1) else if (root->nchild == 1 && root->valnode->val != (int4) '!')
{ {
QTNode *nroot = root->child[0]; QTNode *nroot = root->child[0];