summaryrefslogtreecommitdiff
path: root/source3/python/py_spoolss_forms_conv.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-10-21 04:47:29 +0000
committerTim Potter <tpot@samba.org>2002-10-21 04:47:29 +0000
commit771fc528ebf3ea6d8580b76449df974c4492aae5 (patch)
tree5b7530526eca7ae5fec59a7c651edec1d10b49cb /source3/python/py_spoolss_forms_conv.c
parentd897c63fb596ba9a5a1c6a25f80bdc37b654c611 (diff)
downloadsamba-771fc528ebf3ea6d8580b76449df974c4492aae5.tar.gz
samba-771fc528ebf3ea6d8580b76449df974c4492aae5.tar.bz2
samba-771fc528ebf3ea6d8580b76449df974c4492aae5.zip
More cleanups of validation functions.
(This used to be commit a4790ba42cc6ee4086dafbc64b1dba790a6c3583)
Diffstat (limited to 'source3/python/py_spoolss_forms_conv.c')
-rw-r--r--source3/python/py_spoolss_forms_conv.c5
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);