copy_packet_data: fix memleak

This should fix gif fate memleaks

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>