dict: fix memleak

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