diff options
Diffstat (limited to 'source3/python/py_spoolss_forms_conv.c')
-rw-r--r-- | source3/python/py_spoolss_forms_conv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/python/py_spoolss_forms_conv.c b/source3/python/py_spoolss_forms_conv.c index cfeb475b1e..095a318fd2 100644 --- a/source3/python/py_spoolss_forms_conv.c +++ b/source3/python/py_spoolss_forms_conv.c @@ -74,6 +74,11 @@ BOOL py_to_FORM(FORM *form, PyObject *dict) if (!to_struct(form, dict_copy, py_FORM)) goto done; + /* Careful! We can't call PyString_AsString(obj) then delete + obj and still expect to have our pointer pointing somewhere + useful. */ + + obj = PyDict_GetItemString(dict, "name"); name = PyString_AsString(obj); init_unistr2(&form->name, name, strlen(name) + 1); |