mirror of
https://github.com/postgres/postgres.git
synced 2026-04-22 14:47:29 -04:00
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.
This commit is contained in:
parent
629b3e96dd
commit
fa2fc066f3
1 changed files with 1 additions and 1 deletions
|
|
@ -200,7 +200,7 @@ PLy_output_tuple_funcs(PLyTypeInfo *arg, TupleDesc desc)
|
|||
if (arg->out.r.atts)
|
||||
PLy_free(arg->out.r.atts);
|
||||
arg->out.r.natts = desc->natts;
|
||||
arg->out.r.atts = PLy_malloc0(desc->natts * sizeof(PLyDatumToOb));
|
||||
arg->out.r.atts = PLy_malloc0(desc->natts * sizeof(PLyObToDatum));
|
||||
}
|
||||
|
||||
Assert(OidIsValid(desc->tdtypeid));
|
||||
|
|
|
|||
Loading…
Reference in a new issue