r22165: merge transaction fix from samba3
[samba.git] / source4 / lib / tdb / common / transaction.c
index a592c66039ffb32fa5c2bc4b77d99390282c41a5..0a609af5217d818c905f23b2b2717390f1cbd6b6 100644 (file)
@@ -523,6 +523,8 @@ int tdb_transaction_cancel(struct tdb_context *tdb)
                                   F_UNLCK,F_SETLKW, 0, 1);
                }
                tdb->num_locks = 0;
+               tdb->num_lockrecs = 0;
+               SAFE_FREE(tdb->lockrecs);
        }
 
        /* restore the normal io methods */