nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #928: MINIFICPP-1394 - Speed up ConsumeWindowsEventLog processor
Date Wed, 21 Oct 2020 10:32:03 GMT

szaszm commented on a change in pull request #928:
URL: https://github.com/apache/nifi-minifi-cpp/pull/928#discussion_r509169143



##########
File path: extensions/windows-event-log/wel/WindowsEventLog.cpp
##########
@@ -43,10 +45,10 @@ void WindowsEventLogMetadataImpl::renderMetadata() {
   const auto contextGuard = gsl::finally([&context](){
     EvtClose(context);
   });
-  if (!EvtRender(context, event_ptr_, EvtRenderEventValues, dwBufferSize, nullptr, &dwBufferUsed,
&dwPropertyCount)) {
+  if (!EvtRender(context, event_ptr_, EvtRenderEventValues, dwBufferSize, rendered_values.get(),
&dwBufferUsed, &dwPropertyCount)) {
     if (ERROR_INSUFFICIENT_BUFFER == (status = GetLastError())) {
       dwBufferSize = dwBufferUsed;
-      rendered_values = std::unique_ptr<EVT_VARIANT, utils::FreeDeleter>((PEVT_VARIANT)(malloc(dwBufferSize)));
+      rendered_values.reset((PEVT_VARIANT)(malloc(dwBufferSize)));

Review comment:
       Sorry, I missed that one. It's fine this way.




----------------------------------------------------------------
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:
users@infra.apache.org



Mime
View raw message