diff --git a/cpp/KeywordTagging/KeywordTagging.cpp b/cpp/KeywordTagging/KeywordTagging.cpp index ba3cf646..7f466574 100644 --- a/cpp/KeywordTagging/KeywordTagging.cpp +++ b/cpp/KeywordTagging/KeywordTagging.cpp @@ -67,7 +67,7 @@ KeywordTagging::parse_json(const MPFJob &job, const string &jsonfile_path) { x = boost::locale::conv::utf_to_utf(j); - JSONValue *value = JSON::Parse(x.c_str()); + auto value = std::unique_ptr(JSON::Parse(x.c_str())); if (value == NULL) { throw MPFDetectionException(MPF_COULD_NOT_READ_DATAFILE,