diff options
author | Tim Potter <tpot@samba.org> | 2002-04-14 23:33:31 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-04-14 23:33:31 +0000 |
commit | 3540c42bf4ac403b4a82e970b0e3566ffdc48407 (patch) | |
tree | a48758df4395907d6a32668fd8aa2700bb2cc95d /source3/python | |
parent | 8d680f879605b8e40fe2b4a16db5d860226e17a5 (diff) | |
download | samba-3540c42bf4ac403b4a82e970b0e3566ffdc48407.tar.gz samba-3540c42bf4ac403b4a82e970b0e3566ffdc48407.tar.bz2 samba-3540c42bf4ac403b4a82e970b0e3566ffdc48407.zip |
Shutdown cli_state in the dealloc function. This happens automatically
when a handle object falls out of scope.
(This used to be commit 39546dd241b36d5e7b8e239525a13b91e4e9db80)
Diffstat (limited to 'source3/python')
-rw-r--r-- | source3/python/py_spoolss.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/python/py_spoolss.c b/source3/python/py_spoolss.c index 450abbd6dc..b92e3c1758 100644 --- a/source3/python/py_spoolss.c +++ b/source3/python/py_spoolss.c @@ -192,6 +192,15 @@ Set the form given by the dictionary argument. static void py_policy_hnd_dealloc(PyObject* self) { + spoolss_policy_hnd_object *hnd; + + /* Close down policy handle and free talloc context */ + + hnd = (spoolss_policy_hnd_object*)self; + + cli_shutdown(hnd->cli); + talloc_destroy(hnd->mem_ctx); + PyObject_Del(self); } @@ -337,8 +346,7 @@ void initspoolss(void) module = Py_InitModule("spoolss", spoolss_methods); dict = PyModule_GetDict(module); - /* Make spools_error global an exception we can raise when an error - occurs. */ + /* Exceptions we can raise */ spoolss_error = PyErr_NewException("spoolss.error", NULL, NULL); PyDict_SetItemString(dict, "error", spoolss_error); |