diff --git a/ctdb/server/ctdb_update_record.c b/ctdb/server/ctdb_update_record.c index a4a6fc41a1d..5845f1a7f2b 100644 --- a/ctdb/server/ctdb_update_record.c +++ b/ctdb/server/ctdb_update_record.c @@ -69,13 +69,13 @@ static int ctdb_persistent_store(struct ctdb_persistent_write_state *state) ctdb_ltdb_fetch will unconditionally create a record */ if (state->flags & UPDATE_FLAGS_REPLACE_ONLY) { - TDB_DATA rec; - rec = tdb_fetch(state->ctdb_db->ltdb->tdb, key); - if (rec.dsize == 0) { + TDB_DATA trec; + trec = tdb_fetch(state->ctdb_db->ltdb->tdb, key); + if (trec.dsize == 0) { talloc_free(tmp_ctx); continue; } - free(rec.dptr); + free(trec.dptr); } /* fetch the old header and ensure the rsn is less than the new rsn */