Skip to content

Commit a0db07b

Browse files
committed
Fix invalid memory allocations.
1 parent c97d8d4 commit a0db07b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: jsonb_gin_ops.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ add_entry(Entries *e, Datum key, Pointer extra, bool pmatch)
131131
{
132132
e->total *= 2;
133133
e->entries = (Datum *)repalloc(e->entries, e->total * sizeof(Datum));
134-
e->extra_data = (Pointer *)repalloc(e->entries, e->total * sizeof(Pointer));
135-
e->partial_match = (bool *)repalloc(e->entries, e->total * sizeof(bool));
134+
e->extra_data = (Pointer *)repalloc(e->extra_data, e->total * sizeof(Pointer));
135+
e->partial_match = (bool *)repalloc(e->partial_match, e->total * sizeof(bool));
136136
}
137137
entryNum = e->count;
138138
e->count++;

0 commit comments

Comments
 (0)