summaryrefslogtreecommitdiff
path: root/source4/lib/util/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/util/util.c')
-rw-r--r--source4/lib/util/util.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/lib/util/util.c b/source4/lib/util/util.c
index 7b6bfeeb7b..b5bb75358e 100644
--- a/source4/lib/util/util.c
+++ b/source4/lib/util/util.c
@@ -582,3 +582,18 @@ _PUBLIC_ void *realloc_array(void *ptr, size_t el_size, unsigned count)
return realloc(ptr, el_size * count);
}
+_PUBLIC_ void *talloc_check_name_abort(const void *ptr, const char *name)
+{
+ void *result;
+
+ result = talloc_check_name(ptr, name);
+ if (result != NULL)
+ return result;
+
+ DEBUG(0, ("Talloc type mismatch, expected %s, got %s\n",
+ name, talloc_get_name(ptr)));
+ smb_panic("talloc type mismatch");
+ /* Keep the compiler happy */
+ return NULL;
+}
+