make: fix memory leak

`info->symlink_target` is a `std::string`. This `strdup` therefore leaks
memory. Just use `std::string::operator=(const char *)` instead.

Bug: 206470603
Test: TreeHugger
Change-Id: I71bcaec583c7d429b4d09522cc5eeb2ced009007
This commit is contained in:
George Burgess IV 2022-06-28 11:21:43 -07:00
parent 051c9a15af
commit 4645f98185

View File

@ -147,7 +147,7 @@ class RunfilesCreator {
info->type = FILE_TYPE_REGULAR;
} else {
info->type = FILE_TYPE_SYMLINK;
info->symlink_target = strdup(target);
info->symlink_target = target;
}
FileInfo parent_info;