metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jan 6 14:34:31 CET 2011 on sn-devel-104
$self->pidl("{");
$self->indent;
$self->pidl("$cname *object = ($cname *)py_talloc_get_ptr(py_obj);");
$self->pidl("{");
$self->indent;
$self->pidl("$cname *object = ($cname *)py_talloc_get_ptr(py_obj);");
+ $self->pidl("PyObject *ret;");
$self->pidl("char *retstr;");
$self->pidl("char *retstr;");
$self->pidl("retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_$name, \"$name\", object);");
$self->pidl("retstr = ndr_print_struct_string(py_talloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_$name, \"$name\", object);");
- $self->pidl("return PyString_FromString(retstr);");
+ $self->pidl("ret = PyString_FromString(retstr);");
+ $self->pidl("talloc_free(retstr);");
+ $self->pidl("");
+ $self->pidl("return ret;");
$self->deindent;
$self->pidl("}");
$self->pidl("");
$self->deindent;
$self->pidl("}");
$self->pidl("");