s4:pyrpc: make use of pytalloc_get_type() in py_dcerpc_syntax_init_helper()
authorStefan Metzmacher <metze@samba.org>
Thu, 29 Nov 2018 15:47:15 +0000 (16:47 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 12 Jan 2019 02:13:41 +0000 (03:13 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/librpc/rpc/pyrpc_util.c

index 21d9430..cc67dfc 100644 (file)
@@ -334,7 +334,7 @@ PyObject *py_dcerpc_syntax_init_helper(PyTypeObject *type, PyObject *args, PyObj
                return NULL;
        }
 
-       obj = (struct ndr_syntax_id *)pytalloc_get_ptr(ret);
+       obj = pytalloc_get_type(ret, struct ndr_syntax_id);
        *obj = *syntax;
 
        return ret;