BUG: https://bugzilla.samba.org/show_bug.cgi?id=14213
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
(cherry picked from commit
f7282c0dffbf30d72051a81d46d831344a9bbcf9)
if ($result_size > 1) {
$self->pidl("result = PyTuple_New($result_size);");
+ $self->pidl("if (result == NULL) {");
+ $self->indent;
+ $self->pidl("return NULL;");
+ $self->deindent;
+ $self->pidl("}");
+ $self->pidl("");
$signature .= "(";
} elsif ($result_size == 0) {
$self->pidl("result = Py_None;");