The source project of this merge request has been removed.
Fix three memory leaks and use smart pointers instead.
when compiling autotests with fsanitize, it found leaks here running various tests, instead of manually freeing the memory just convert them to smart pointers.