fix free of statically allocated value