diff options
Diffstat (limited to 'source3/python/py_spoolss_printerdata.c')
-rw-r--r-- | source3/python/py_spoolss_printerdata.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/python/py_spoolss_printerdata.c b/source3/python/py_spoolss_printerdata.c index 195f01f62d..e89f985fef 100644 --- a/source3/python/py_spoolss_printerdata.c +++ b/source3/python/py_spoolss_printerdata.c @@ -315,11 +315,16 @@ PyObject *spoolss_hnd_enumprinterdataex(PyObject *self, PyObject *args, PyObject char *key; WERROR werror; PyObject *result; - REGVAL_CTR ctr; + REGVAL_CTR *ctr; if (!PyArg_ParseTupleAndKeywords(args, kw, "s", kwlist, &key)) return NULL; + if (!(ctr = TALLOC_ZERO_P(hnd->mem_ctx, REGVAL_CTR))) { + PyErr_SetObject(spoolss_werror, py_werror_tuple(werror)); + return NULL; + } + /* Get max buffer sizes for value and data */ werror = rpccli_spoolss_enumprinterdataex( |