dont use the pointer after it has been talloc_free()d. (cherry picked from commit...
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 5 Nov 2009 05:07:23 +0000 (16:07 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Mon, 11 Jan 2010 22:47:30 +0000 (09:47 +1100)
Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
server/ctdb_vacuum.c

index cee7356c96b07d2200877a5d02461d6bbac7a1d7..e688f951736f40888b67d61ed3edb0028caae018 100644 (file)
@@ -646,8 +646,8 @@ static int ctdb_repack_db(struct ctdb_db_context *ctdb_db, TALLOC_CTX *mem_ctx)
         * decide if a repack is necessary
         */
        if (size < repack_limit && vdata->delete_count < vacuum_limit) {
-               talloc_free(vdata);
                update_tuning_db(ctdb_db, vdata, size);
+               talloc_free(vdata);
                return 0;
        }