fix memory leak bug in dsift