Fix coverity pf leak by cleaning the function up

CID fixed:
	1258915
	1258912
	1258911