Fix memory leak (using pointers)
PeerConfig contains pointer to devices and folder too (same address for the same device in different folders)