fix mem leak
Merge branch 'master' into 2.3