* fhandler_tty.cc (fhandler_tty_slave::dup): Free path_conv strings
to avoid memory leak. Add comment. (fhandler_pty_master::dup): Ditto. * path.h (path_conv::free_strings): New method.
This commit is contained in:
@ -293,6 +293,11 @@ class path_conv
|
||||
wide_path = NULL;
|
||||
return *this;
|
||||
}
|
||||
void free_strings ()
|
||||
{
|
||||
cfree (modifiable_path ());
|
||||
cfree ((char *) normalized_path);
|
||||
}
|
||||
DWORD get_devn () const {return dev.devn;}
|
||||
short get_unitn () const {return dev.minor;}
|
||||
DWORD file_attributes () const {return fileattr;}
|
||||
|
Reference in New Issue
Block a user