I’ll post my answer in a while once interested people post some answers. This is a pretty easy one for experts but a real good one to check OO basics of C++ candidates.
Yes there is a bug. Its a memory leak, be aware that a virtual function call from a constructor/destructor will not behave as expected. The call will not call the implementation in the derived class. You’ll not get an error message either. You’ll take notice of the bug only until the memory starts growing, god forbid this happens in production environment. You’ll end up having to call me up. The correct way to fix such issues is to use the C++ STL classes or the equivalent language collection classes to avoid direct memory allocation. The other and probably the ideal way to fix this issue is to let the allocator be the de-allocator. So if derived is allocating then let derived do de-allocation.