Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7e4d160

Browse files
committed
Fix uninitialized variables in json's populate_record_worker().
Peter Geoghegan.
1 parent 2d5e0f0 commit 7e4d160

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/utils/adt/jsonfuncs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2160,6 +2160,8 @@ populate_record_worker(FunctionCallInfo fcinfo, bool have_record_arg)
21602160
my_extra = (RecordIOData *) fcinfo->flinfo->fn_extra;
21612161
my_extra->record_type = InvalidOid;
21622162
my_extra->record_typmod = 0;
2163+
my_extra->ncolumns = ncolumns;
2164+
MemSet(my_extra->columns, 0, sizeof(ColumnIOData) * ncolumns);
21632165
}
21642166

21652167
if (have_record_arg && (my_extra->record_type != tupType ||

0 commit comments

Comments
 (0)