diff --git a/src/core/memory_pool.h b/src/core/memory_pool.h index fe2f1a6d3a..5b036d0fd4 100644 --- a/src/core/memory_pool.h +++ b/src/core/memory_pool.h @@ -52,7 +52,7 @@ class MemoryPool { if (*ptr == NULL) { *ptr = reinterpret_cast(malloc(size)); } else if (size != 0) { - *ptr = reinterpret_cast(realloc(ptr, size)); + *ptr = reinterpret_cast(realloc(*ptr, size)); } else { free(*ptr); *ptr = NULL; diff --git a/src/util/hsa_rsrc_factory.h b/src/util/hsa_rsrc_factory.h index 3bfeda68c1..21e25082ab 100644 --- a/src/util/hsa_rsrc_factory.h +++ b/src/util/hsa_rsrc_factory.h @@ -223,7 +223,7 @@ class HsaTimer { void correlated_pair_ns(time_id_t time_id, uint32_t iters, timestamp_t* timestamp_v, timestamp_t* time_v, timestamp_t* error_v) const { clockid_t clock_id = 0; - switch (clock_id) { + switch (time_id) { case TIME_ID_CLOCK_REALTIME: clock_id = CLOCK_REALTIME; break;