Heat oil in a large skillet over medium heat. Fry onion in oil until translucent. Transfer to a medium bowl, and mix with mashed potatoes and corned beef. Season with salt and pepper. Form into 8 patties. Fry patties in the skillet over medium-high heat until golden brown on both sides.