szaszm commented on code in PR #2176:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2176#discussion_r3461444247
##########
libminifi/src/core/ClassLoader.cpp:
##########
@@ -275,7 +275,7 @@ gsl::owner<CoreComponent*>
ClassLoaderImpl::instantiateRaw(const std::string &cl
if (filter(obj)) {
return obj;
}
- delete gsl::owner<CoreComponent*>{obj};
+ delete obj; // NOLINT(cppcoreguidelines-owning-memory)
Review Comment:
it seems that if filter throws, obj is leaked. Bug not introduced here, and
most likely not a problem in practice, since filter functions tend to not
throw, I just noticed it.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]