[PATCH] Fix potential small memory leak