Avoid leaking memory when receiving a bad response.
authorLinus Nordberg <linus@nordberg.se>
Mon, 18 Nov 2013 16:27:23 +0000 (17:27 +0100)
committerLinus Nordberg <linus@nordberg.se>
Mon, 18 Nov 2013 16:27:23 +0000 (17:27 +0100)
commit049e72ddaa0cd24fce2d7550e604fc47ec7f9b3b
treea9ad621349a19387013b4aae143c9872d3bd46ae
parent1f84470aaf49264084d39078adb4afd26d0b4d71
Avoid leaking memory when receiving a bad response.

A badly authenticated response message or one that didn't decode or
decrypt correctly was never freed. If caller didn't pass pkt_out, any
response was leaked as well.

As a bonus, the code is now readable too.
lib/conn.c