mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
pidl:Python: check PyTuple_New() return value
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>
This commit is contained in:
committed by
Douglas Bagnall
parent
9dfb0ed8d2
commit
f7282c0dff
@ -1042,6 +1042,12 @@ sub PythonFunctionUnpackOut($$$)
|
||||
|
||||
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;");
|
||||
|
Reference in New Issue
Block a user