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

Commit fa2fc06

Browse files
committed
PL/Python: Fix type mixup
Memory was allocated based on the sizeof a type that was not the type of the pointer that the result was being assigned to. The types happen to be of the same size, but it's still wrong.
1 parent 629b3e9 commit fa2fc06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pl/plpython/plpy_typeio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ PLy_output_tuple_funcs(PLyTypeInfo *arg, TupleDesc desc)
200200
if (arg->out.r.atts)
201201
PLy_free(arg->out.r.atts);
202202
arg->out.r.natts = desc->natts;
203-
arg->out.r.atts = PLy_malloc0(desc->natts * sizeof(PLyDatumToOb));
203+
arg->out.r.atts = PLy_malloc0(desc->natts * sizeof(PLyObToDatum));
204204
}
205205

206206
Assert(OidIsValid(desc->tdtypeid));

0 commit comments

Comments
 (0)