prevent read in freed memory
Merge pull request #920 from dlesaffre/master

serial port comm: prevent read in freed memory