Fix some potential minor mem leaks

I hope that this doesn't break anything. I can't test the changes in
tethering code right now ...