diff options
Diffstat (limited to 'source4/libcli/raw/clisession.c')
-rw-r--r-- | source4/libcli/raw/clisession.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/source4/libcli/raw/clisession.c b/source4/libcli/raw/clisession.c index 0c6c80d94c..431d225021 100644 --- a/source4/libcli/raw/clisession.c +++ b/source4/libcli/raw/clisession.c @@ -27,16 +27,6 @@ } while (0) -/* - destroy a smbcli_session -*/ -static int session_destroy(void *ptr) -{ - struct smbcli_session *session = ptr; - talloc_free(session->transport); - return 0; -} - /**************************************************************************** Initialize the session context ****************************************************************************/ @@ -50,12 +40,10 @@ struct smbcli_session *smbcli_session_init(struct smbcli_transport *transport) } ZERO_STRUCTP(session); - session->transport = transport; + session->transport = talloc_reference(session, transport); session->pid = (uint16_t)getpid(); session->vuid = UID_FIELD_INVALID; - talloc_set_destructor(session, session_destroy); - return session; } |