Fix a memory leak in linux sandbox
Fix a memory leak in linux sandbox

`getcwd` result is allocated using `malloc` and should be deallocated with
`free`.

However `opt.working_dir` won't own it because that's an `std::string` and
the current `operator=` call will allocate a new buffer and copy the
content of `getcwd` result.

Hence, in the previous solution, the result of `getcwd` was just leaked at
the end of the function.

This commit adds the necessary `free`.

*edit*: I found that when running a C++ ASAN sanitizer during my build. I have a rule which setups the environment with `LD_PRELOAD and apparently bazel is calling the sandbox inside the build environment, hence it inherit the `LD_PRELOAD` setting.

Closes #10599.

PiperOrigin-RevId: 293835331

katre/bazel,ButterflyNetwork/bazel,werkt/bazel,ButterflyNetwork/bazel,dslomov/bazel,cushon/bazel,davidzchen/bazel,perezd/bazel,dslomov/bazel,cushon/bazel,bazelbuild/bazel,werkt/bazel,safarmer/bazel,bazelbuild/bazel,katre/bazel,cushon/bazel,ButterflyNetwork/bazel,dslomov/bazel-windows,dslomov/bazel,werkt/bazel,perezd/bazel,perezd/bazel,davidzchen/bazel,meteorcloudy/bazel,davidzchen/bazel,werkt/bazel,katre/bazel,ButterflyNetwork/bazel,dslomov/bazel,meteorcloudy/bazel,ulfjack/bazel,cushon/bazel,ButterflyNetwork/bazel,cushon/bazel,meteorcloudy/bazel,ulfjack/bazel,akira-baruah/bazel,twitter-forks/bazel,cushon/bazel,davidzchen/bazel,safarmer/bazel,katre/bazel,twitter-forks/bazel,akira-baruah/bazel,davidzchen/bazel,perezd/bazel,dslomov/bazel-windows,akira-baruah/bazel,perezd/bazel,akira-baruah/bazel,twitter-forks/bazel,dslomov/bazel-windows,twitter-forks/bazel,katre/bazel,dslomov/bazel,twitter-forks/bazel,twitter-forks/bazel,bazelbuild/bazel,ulfjack/bazel,ulfjack/bazel,ulfjack/bazel,ButterflyNetwork/bazel,katre/bazel,bazelbuild/bazel,twitter-forks/bazel,werkt/bazel,safarmer/bazel,safarmer/bazel,werkt/bazel,ulfjack/bazel,ulfjack/bazel,safarmer/bazel,bazelbuild/bazel,davidzchen/bazel,dslomov/bazel,perezd/bazel,davidzchen/bazel,akira-baruah/bazel,dslomov/bazel,safarmer/bazel,bazelbuild/bazel,dslomov/bazel-windows,perezd/bazel,dslomov/bazel-windows,akira-baruah/bazel,meteorcloudy/bazel,meteorcloudy/bazel,dslomov/bazel-windows,meteorcloudy/bazel,meteorcloudy/bazel