LibC VFS: Warn on possible FD path leaks

This commit is contained in:
Martin Stein
2017-02-16 19:02:19 +01:00
committed by Christian Helmuth
parent 222a789fef
commit 06e605defa
2 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,7 @@ namespace Libc {
void path(char const *newpath)
{
if (fd_path) { Genode::warning("may leak former FD path memory"); }
if (newpath) {
Genode::size_t const path_size = ::strlen(newpath) + 1;
char *buf = (char*)malloc(path_size);