Fix mistmatched malloc and operator delete

QScopedPointerPodDeleter should be used instead of default deleter.
Usage of operator delete instead of std::free for memory allocated
with malloc could cause problems.