move to SAFE_FREE()
[samba.git] / source3 / smbd / conn.c
index c2faa4f15a5cdcf73afda5c10e280c3075b75d97..08704927c561f1d5125d419f63700bec63f221bb 100644 (file)
@@ -177,8 +177,7 @@ void conn_free(connection_struct *conn)
        DLIST_REMOVE(Connections, conn);
 
        if (conn->ngroups && conn->groups) {
-               free(conn->groups);
-               conn->groups = NULL;
+               SAFE_FREE(conn->groups);
                conn->ngroups = 0;
        }
 
@@ -196,7 +195,7 @@ void conn_free(connection_struct *conn)
        num_open--;
 
        ZERO_STRUCTP(conn);
-       free(conn);
+       SAFE_FREE(conn);
 }