summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-03-13 09:53:32 +1100
committerAndrew Bartlett <abartlet@samba.org>2008-03-13 09:53:32 +1100
commit6f2935d082687eee23dbc9f1108162cf1670831a (patch)
tree956e4248e71807fd8576e5d53a24085de09c5851 /source4
parent69d66e6fb09b2449dec9bf0af49408b9a6c3cc65 (diff)
downloadsamba-6f2935d082687eee23dbc9f1108162cf1670831a.tar.gz
samba-6f2935d082687eee23dbc9f1108162cf1670831a.tar.bz2
samba-6f2935d082687eee23dbc9f1108162cf1670831a.zip
Don't talloc_free() the UUID before we return.
This error caused us to put a 0x80 byte at the end of GUID, which was only detected by OpenLDAP's schema checking. Andrew Bartlett (This used to be commit fd99b7719bcb503e2695b2cbad0230fa23a094ca)
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/uuidmodule.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/scripting/python/uuidmodule.c b/source4/scripting/python/uuidmodule.c
index e05b286dd0..cd9a1cb4d5 100644
--- a/source4/scripting/python/uuidmodule.c
+++ b/source4/scripting/python/uuidmodule.c
@@ -24,6 +24,7 @@
static PyObject *uuid_random(PyObject *self, PyObject *args)
{
struct GUID guid;
+ PyObject *pyobj;
char *str;
if (!PyArg_ParseTuple(args, (char *)""))
@@ -37,9 +38,11 @@ static PyObject *uuid_random(PyObject *self, PyObject *args)
return NULL;
}
+ pyobj = PyString_FromString(str);
+
talloc_free(str);
- return PyString_FromString(str);
+ return pyobj;
}
static PyMethodDef methods[] = {