Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a0db07b

Browse filesBrowse files
committed
Fix invalid memory allocations.
1 parent c97d8d4 commit a0db07b
Copy full SHA for a0db07b

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎jsonb_gin_ops.c

Copy file name to clipboardExpand all lines: jsonb_gin_ops.c
+2-2Lines changed: 2 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.