QSV: fix memory leak