summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/conn.c2
-rw-r--r--source3/web/statuspage.c5
-rw-r--r--source3/winbindd/winbindd_util.c3
3 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c
index b9433bb965..7f34d2b8e2 100644
--- a/source3/smbd/conn.c
+++ b/source3/smbd/conn.c
@@ -252,8 +252,8 @@ void conn_free_internal(connection_struct *conn)
/* Free vfs_connection_struct */
handle = conn->vfs_handles;
while(handle) {
- DLIST_REMOVE(conn->vfs_handles, handle);
thandle = handle->next;
+ DLIST_REMOVE(conn->vfs_handles, handle);
if (handle->free_data)
handle->free_data(&handle->data);
handle = thandle;
diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c
index ce24c7cddd..e684a075c2 100644
--- a/source3/web/statuspage.c
+++ b/source3/web/statuspage.c
@@ -43,9 +43,10 @@ static void initPid2Machine (void)
{
/* show machine name rather PID on table "Open Files"? */
if (PID_or_Machine) {
- PIDMAP *p;
+ PIDMAP *p, *next;
- for (p = pidmap; p != NULL; ) {
+ for (p = pidmap; p != NULL; p = next) {
+ next = p->next;
DLIST_REMOVE(pidmap, p);
SAFE_FREE(p->machine);
SAFE_FREE(p);
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index b8cb27c797..fdfc8ed9d1 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -1075,13 +1075,12 @@ void free_getent_state(struct getent_state *state)
temp = state;
while(temp != NULL) {
- struct getent_state *next;
+ struct getent_state *next = temp->next;
/* Free sam entries then list entry */
SAFE_FREE(state->sam_entries);
DLIST_REMOVE(state, state);
- next = temp->next;
SAFE_FREE(temp);
temp = next;