intel: fix intel_base_dbg creation
I should have done some testing.
diff --git a/icd/intel/obj.c b/icd/intel/obj.c
index f6b6e15..b7cdef3 100644
--- a/icd/intel/obj.c
+++ b/icd/intel/obj.c
@@ -121,7 +121,7 @@
strlen((const char *) src->ppEnabledExtensionNames[i]);
}
- dst = icd_alloc(sizeof(size), 0, XGL_SYSTEM_ALLOC_DEBUG);
+ dst = icd_alloc(size, 0, XGL_SYSTEM_ALLOC_DEBUG);
if (!dst)
return false;
@@ -162,7 +162,7 @@
{
struct intel_base_dbg *dbg;
- if (alloc_size)
+ if (!alloc_size)
alloc_size = sizeof(*dbg);
assert(alloc_size >= sizeof(*dbg));