提交 4325adc4 编写于 作者: K Kenan Yao

Fix a bug in function destroyConnHashTable which frees a wrong pointer and

should cause SIGSEGV.
Signed-off-by: NPengzhou Tang <ptang@pivotal.io>
上级 3303bb8b
...@@ -1720,7 +1720,7 @@ destroyConnHashTable(ConnHashTable *ht) ...@@ -1720,7 +1720,7 @@ destroyConnHashTable(ConnHashTable *ht)
if (ht->cxt) if (ht->cxt)
pfree(trash); pfree(trash);
else else
free(ht->table); free(trash);
} }
} }
...@@ -1728,6 +1728,9 @@ destroyConnHashTable(ConnHashTable *ht) ...@@ -1728,6 +1728,9 @@ destroyConnHashTable(ConnHashTable *ht)
pfree(ht->table); pfree(ht->table);
else else
free(ht->table); free(ht->table);
ht->table = NULL;
ht->size = 0;
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册