summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--dev/ZKA/NewKit/Ref.hxx3
-rw-r--r--dev/ZKA/Sources/CodeManager.cxx2
2 files changed, 3 insertions, 2 deletions
diff --git a/dev/ZKA/NewKit/Ref.hxx b/dev/ZKA/NewKit/Ref.hxx
index 3764611c..f23cfc08 100644
--- a/dev/ZKA/NewKit/Ref.hxx
+++ b/dev/ZKA/NewKit/Ref.hxx
@@ -30,7 +30,7 @@ namespace Kernel
Ref& operator=(T ref)
{
if (!fClass)
- fClass = (T*)mm_new_ke_heap(sizeof(T), false, false);
+ return *this;
*fClass = ref;
return *this;
@@ -39,6 +39,7 @@ namespace Kernel
public:
T& operator->() const
{
+ MUST_PASS(*fClass);
return *fClass;
}
diff --git a/dev/ZKA/Sources/CodeManager.cxx b/dev/ZKA/Sources/CodeManager.cxx
index ae4354c8..4d478a7a 100644
--- a/dev/ZKA/Sources/CodeManager.cxx
+++ b/dev/ZKA/Sources/CodeManager.cxx
@@ -23,7 +23,7 @@ namespace Kernel
proc.Kind = PROCESS_HEADER_BLOCK::kAppKind;
rt_copy_memory((VoidPtr)processName, proc.Name, rt_string_len(proc.Name));
- Ref<PROCESS_HEADER_BLOCK> refProc = proc;
+ Ref<PROCESS_HEADER_BLOCK> refProc{proc};
return ProcessScheduler::The().Leak().Add(refProc);
}