Skip to content

Commit ad4fc96

Browse files
committed
fix segfault in get_index_list
1 parent d55838e commit ad4fc96

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/checkdb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,15 +455,14 @@ get_index_list(const char *dbname, bool first_db_with_amcheck,
455455
ind->heapallindexed_is_supported = heapallindexed_is_supported;
456456
ind->amcheck_nspname = pgut_malloc(strlen(amcheck_nspname) + 1);
457457
strcpy(ind->amcheck_nspname, amcheck_nspname);
458+
pg_atomic_clear_flag(&ind->lock);
458459

459460
if (index_list == NULL)
460461
index_list = parray_new();
461462

462463
parray_append(index_list, ind);
463464
}
464465

465-
pfilearray_clear_locks(index_list);
466-
467466
PQclear(res);
468467

469468
return index_list;

0 commit comments

Comments
 (0)