1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

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 commit is contained in:
Andrew Bartlett
2008-03-13 09:53:32 +11:00
parent a0754c2a85
commit fd99b7719b

View File

@ -24,6 +24,7 @@
static PyObject *uuid_random(PyObject *self, PyObject *args) static PyObject *uuid_random(PyObject *self, PyObject *args)
{ {
struct GUID guid; struct GUID guid;
PyObject *pyobj;
char *str; char *str;
if (!PyArg_ParseTuple(args, (char *)"")) if (!PyArg_ParseTuple(args, (char *)""))
@ -37,9 +38,11 @@ static PyObject *uuid_random(PyObject *self, PyObject *args)
return NULL; return NULL;
} }
pyobj = PyString_FromString(str);
talloc_free(str); talloc_free(str);
return PyString_FromString(str); return pyobj;
} }
static PyMethodDef methods[] = { static PyMethodDef methods[] = {