1
0
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:
Stefan Metzmacher
2025-01-28 10:20:08 +01:00
committed by Douglas Bagnall
parent 9dfb0ed8d2
commit f7282c0dff

View File

@ -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;");