diff options
author | Volker Lendecke <vl@samba.org> | 2010-08-30 15:22:29 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-08-30 23:06:32 +0200 |
commit | 6beb5563f3464cf32109c9069b39a5cf71134321 (patch) | |
tree | 9ddbb3899f0d4653e7a0f7cab00f96cbf590cecc /source3/smbd | |
parent | b4610cdb3b1d8e20bafd6d2d563360a59ef33ba3 (diff) | |
download | samba-6beb5563f3464cf32109c9069b39a5cf71134321.tar.gz samba-6beb5563f3464cf32109c9069b39a5cf71134321.tar.bz2 samba-6beb5563f3464cf32109c9069b39a5cf71134321.zip |
s3: Fix a segfault in the printer code using create_conn_struct
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/conn.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index eaaddabc84..fffb5bf9de 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -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--; |