1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

s3: Fix a segfault in the printer code using create_conn_struct

This commit is contained in:
Volker Lendecke 2010-08-30 15:22:29 +02:00
parent b4610cdb3b
commit 6beb5563f3

View File

@ -321,7 +321,13 @@ void conn_free(connection_struct *conn)
DLIST_REMOVE(conn->sconn->smb1.tcons.Connections, conn);
bitmap_clear(conn->sconn->smb1.tcons.bmap, conn->cnum);
if (conn->sconn->smb1.tcons.bmap != NULL) {
/*
* Can be NULL for fake connections created by
* create_conn_struct()
*/
bitmap_clear(conn->sconn->smb1.tcons.bmap, conn->cnum);
}
SMB_ASSERT(conn->sconn->smb1.tcons.num_open > 0);
conn->sconn->smb1.tcons.num_open--;