szaszm commented on a change in pull request #812:
URL: https://github.com/apache/nifi-minifi-cpp/pull/812#discussion_r439617278
##########
File path: extensions/windows-event-log/ConsumeWindowsEventLog.cpp
##########
@@ -173,6 +173,15 @@ ConsumeWindowsEventLog::ConsumeWindowsEventLog(const
std::string& name, utils::I
writePlainText_ = false;
}
+void ConsumeWindowsEventLog::notifyStop() {
+ logger_->log_trace("start notifyStop");
+ pBookmark_.reset();
+ if (hMsobjsDll_) {
+ FreeLibrary(hMsobjsDll_);
Review comment:
Unloading the DLL on every reload is quite dangerous IMO. Why do we do
it?
In any case, to avoid double free, we should set `hMsobjsDll_` to `nullptr`
after freeing it. Otherwise the dtor would call `FreeLibrary` again, which
might be problematic.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]