fix memory leak on string reassign

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fixes CID968584 and CID968585