Fix memory leak in ctorNilPtrPlacementProxy

This commit is contained in:
Raphael Isemann 2022-03-24 14:27:43 +01:00 committed by Robin Gareus
parent f26257d6e4
commit 3dfcbf17b2
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 2 additions and 2 deletions

View File

@ -485,8 +485,8 @@ private:
template <class T>
static int ctorNilPtrPlacementProxy (lua_State* L)
{
const T* newobject = new T ();
Stack<T>::push (L, *newobject);
const T newobject;
Stack<T>::push (L, newobject);
return 1;
}