r23779: Change from v2 or later to v3 or later.
[samba.git] / source3 / smbd / session.c
index 837c37a49f7cc40430507fe199117e5090491ca1..62fa10f5910d4cdf5466c14ddee69a7f22101718 100644 (file)
@@ -8,7 +8,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -192,10 +192,11 @@ BOOL session_claim(user_struct *vuser)
 
        status = rec->store(rec, data, TDB_REPLACE);
 
+       TALLOC_FREE(rec);
+
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(1,("session_claim: unable to create session id "
                         "record: %s\n", nt_errstr(status)));
-               TALLOC_FREE(rec);
                return False;
        }
 
@@ -275,7 +276,7 @@ static BOOL session_traverse(int (*fn)(struct db_record *db,
                return False;
        }
 
-       ctx->traverse(ctx, fn, private_data);
+       ctx->traverse_read(ctx, fn, private_data);
        return True;
 }