[ https://issues.apache.org/jira/browse/MINIFICPP-645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16688673#comment-16688673 ]
ASF GitHub Bot commented on MINIFICPP-645: ------------------------------------------ Github user phrocker commented on a diff in the pull request: https://github.com/apache/nifi-minifi-cpp/pull/439#discussion_r234012390 --- Diff: nanofi/src/api/nanofi.cpp --- @@ -205,7 +205,7 @@ flow_file_record* create_ff_object(const char *file, const size_t len, const uin } flow_file_record* create_ff_object_na(const char *file, const size_t len, const uint64_t size) { - flow_file_record *new_ff = new flow_file_record; + flow_file_record *new_ff = (flow_file_record*) malloc(sizeof(flow_file_record)); --- End diff -- Oops, sorry, must change the delete to free due to avoid heap corruption. > Move from new to malloc in CAPI to facilitate eventual change from C++ to C > --------------------------------------------------------------------------- > > Key: MINIFICPP-645 > URL: https://issues.apache.org/jira/browse/MINIFICPP-645 > Project: NiFi MiNiFi C++ > Issue Type: Improvement > Reporter: Mr TheSegfault > Assignee: Arpad Boda > Priority: Blocker > Labels: CAPI, nanofi > Fix For: 0.6.0 > > > As gradually move to C we should move out of libminifi and remove the linter. > Nothing that is returned via the API that is not an opaque pointer should use > new -- This message was sent by Atlassian JIRA (v7.6.3#76005)