talloc: Clarify error message on access after free.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 5 Jan 2011 00:01:28 +0000 (01:01 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 5 Jan 2011 00:01:28 +0000 (01:01 +0100)
lib/talloc/talloc.c

index ec67a463abc43a5e0c92940f552c2e2ef52e8be0..d6115af5299856328674747b93d497fd5ebe8d02 100644 (file)
@@ -224,9 +224,9 @@ static void talloc_abort_magic(unsigned magic)
        talloc_abort("Bad talloc magic value - wrong talloc version used/mixed");
 }
 
-static void talloc_abort_double_free(void)
+static void talloc_abort_access_after_free(void)
 {
-       talloc_abort("Bad talloc magic value - double free");
+       talloc_abort("Bad talloc magic value - access after free");
 }
 
 static void talloc_abort_unknown_value(void)
@@ -246,8 +246,8 @@ static inline struct talloc_chunk *talloc_chunk_from_ptr(const void *ptr)
                }
 
                if (tc->flags & TALLOC_FLAG_FREE) {
-                       talloc_log("talloc: double free error - first free may be at %s\n", tc->name);
-                       talloc_abort_double_free();
+                       talloc_log("talloc: access after free error - first free may be at %s\n", tc->name);
+                       talloc_abort_access_after_free();
                        return NULL;
                } else {
                        talloc_abort_unknown_value();