You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/09/04 12:09:01 UTC

[GitHub] [nifi-minifi-cpp] hunyadi-dev commented on a change in pull request #896: MINIFICPP-1353 Fix a heap-use-after-free error

hunyadi-dev commented on a change in pull request #896:
URL: https://github.com/apache/nifi-minifi-cpp/pull/896#discussion_r483574962



##########
File path: extensions/http-curl/processors/InvokeHTTP.cpp
##########
@@ -283,6 +283,10 @@ void InvokeHTTP::onTrigger(const std::shared_ptr<core::ProcessContext> &context,
   // create a transaction id
   std::string tx_id = generateId();
 
+  std::unique_ptr<utils::ByteInputCallBack> callback = nullptr;
+  std::unique_ptr<utils::HTTPUploadCallback> callbackObj = nullptr;
+
+  // Client declared after the callbacks to make sure the callbacks are still available when the client is destructed

Review comment:
       Might be worth mentioning that the destruction of `callback` and `callbackObj` also matters.




----------------------------------------------------------------
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