acelyc111 commented on a change in pull request #3495:
URL: https://github.com/apache/incubator-doris/pull/3495#discussion_r422183638
##########
File path: be/src/util/path_util.cpp
##########
@@ -70,13 +70,19 @@ vector<string> split_path(const string& path) {
return segments;
}
+struct FreeDeleter {
+ inline void operator()(void* ptr) const {
+ free(ptr);
+ }
+};
+
string dir_name(const string& path) {
- std::unique_ptr<char[]> path_copy(strdup(path.c_str()));
+ std::unique_ptr<char[], FreeDeleter> path_copy(strdup(path.c_str()));
Review comment:
> ? I change it to std::vector and ASAN work fine.
> I will test it.
@kangkaisen Sorry I made a mistake, it works fine indeed to modify the code
by your suggestion, but it report the error above by @imay 's.
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]