aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2013-06-13 21:42:42 -0400
committerPeter Eisentraut <peter_e@gmx.net>2013-06-13 21:42:42 -0400
commitfa2fc066f34f1b631b5f92f11e7cda9f60a25330 (patch)
tree681550fbbdd93cbb00ccdf2efa07e178a565bc04 /src
parent629b3e96dd64fa081d8b4610c5a723ef68af09d7 (diff)
downloadpostgresql-fa2fc066f34f1b631b5f92f11e7cda9f60a25330.tar.gz
postgresql-fa2fc066f34f1b631b5f92f11e7cda9f60a25330.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpython/plpy_typeio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pl/plpython/plpy_typeio.c b/src/pl/plpython/plpy_typeio.c
index 8f2367d3042..6a9a2cb9747 100644
--- a/src/pl/plpython/plpy_typeio.c
+++ b/src/pl/plpython/plpy_typeio.c
@@ -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));