Fixes for memory issues detected by valgrind

This commit is contained in:
Térence Clastres 2020-08-12 20:29:39 +02:00 committed by Adam Honse
parent ff07a488a2
commit 53379c5482
17 changed files with 74 additions and 27 deletions

View file

@ -33,6 +33,7 @@ std::vector<std::string *> find_usb_serial_port(unsigned short vid, unsigned sho
if(dir == NULL)
{
closedir(dir);
return ret_vector;
}
@ -122,6 +123,8 @@ std::vector<std::string *> find_usb_serial_port(unsigned short vid, unsigned sho
ent = readdir(dir);
}
closedir(dir);
return ret_vector;
} /* find_usb_serial_port() */