s4-pycredentials: avoid a tallloc_free on ref
authorAndrew Tridgell <tridge@samba.org>
Fri, 24 Sep 2010 02:46:27 +0000 (19:46 -0700)
committerAndrew Tridgell <tridge@samba.org>
Sat, 25 Sep 2010 17:38:44 +0000 (10:38 -0700)
with the new py object structure, we need to unlink not free

source4/auth/credentials/pycredentials.c

index 879d906d6fcf6378dbd1eeb21d437a08ae41ce72..b7de7545ecfab613f996b63e43c2c8b13f3fb00c 100644 (file)
@@ -319,7 +319,7 @@ static PyObject *py_creds_get_named_ccache(py_talloc_Object *self, PyObject *arg
 
        ret = cli_credentials_get_named_ccache(creds, event_ctx, lp_ctx,
                                               ccache_name, &ccc, &error_string);
-       talloc_free(lp_ctx);
+       talloc_unlink(mem_ctx, lp_ctx);
        if (ret == 0) {
                talloc_steal(ccc, event_ctx);
                talloc_free(mem_ctx);