fix tiny memory leak in read_packet (leak only happens when malloc returns NULL so...