Fix unitialized stat structure in Vlsisapd, Path::mode() (valgrind).

This commit is contained in:
Jean-Paul Chaput 2021-05-11 13:46:53 +02:00
parent c137c1ac5b
commit 079f4c2009
1 changed files with 10 additions and 0 deletions

View File

@ -250,6 +250,16 @@ namespace Utilities {
unsigned int Path::mode () const unsigned int Path::mode () const
{ {
struct stat bstat; struct stat bstat;
bstat.st_dev = 0;
bstat.st_ino = 0;
bstat.st_mode = 0;
bstat.st_nlink = 0;
bstat.st_uid = 0;
bstat.st_gid = 0;
bstat.st_rdev = 0;
bstat.st_size = 0;
bstat.st_blksize = 0;
bstat.st_blocks = 0;
//int status = 0; //int status = 0;
//status = //status =
::stat( toString().c_str(), &bstat ); ::stat( toString().c_str(), &bstat );