Skip to content

Commit ab76a10

Browse files
authored
Another place where refcnt in the COL_INFO object is unfortunately (#55)
erased. Signed-off-by: Alexandr Kuznetsov <[email protected]>
1 parent 0777199 commit ab76a10

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

descriptor.c

+4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ void TI_ClearObject(TABLE_INFO *ti)
5858
MYLOG(0, "!!!refcnt %p:%d -> %d\n", coli, coli->refcnt, coli->refcnt - 1);
5959
coli->refcnt--;
6060
if (coli->refcnt <= 1 && 0 == coli->acc_time) /* acc_time == 0 means the table is dropped */
61+
{
62+
Int2 tmp_refcnt = coli->refcnt; /* If refcnt is still above 0, we must save it. */
6163
free_col_info_contents(coli); /* Now coli object is unused, and may be reused later. */
64+
coli->refcnt = tmp_refcnt;
65+
}
6266
if (coli->refcnt <= 0)
6367
{
6468
/* Last reference to coli object disappeared. Now destroying it. */

0 commit comments

Comments
 (0)