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:
@ -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];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user