We can't reference xconn->next after it was talloc_free'ed
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Oct 10 14:32:53 CEST 2014 on sn-devel-104
* because smbd_msg_ctx is not a talloc child of smbd_server_conn.
*/
if (client != NULL) {
- for (; xconn != NULL; xconn = xconn->next) {
+ struct smbXsrv_connection *next;
+
+ for (; xconn != NULL; xconn = next) {
+ next = xconn->next;
DLIST_REMOVE(client->connections, xconn);
talloc_free(xconn);
}