It doesn't matter anyway, as some microorganisms are known to endure exposure to open space for years. Sterilizing Curiosity would likely be impractical (its size and weight are comparable to a small car, which is much larger than a potato). A smaller probe designed for finding life and only that could be a safer bet.
Besides, we're on another planet. If our payload was nothing but the nastiest chemical we could come up with, we still couldn't ship enough to Mars for it to matter.
No, the only payload that could conceivably be harmful is one that can self-replicate, which at this juncture means life. (Ask again in a hundred years.)
---
For sterilization, they will probably use gamma rays. They are strong enough to break a lot of chemical molecules, and then kill all the bacteria. But the gamma rays are not strong enough to break the atoms nuclei or make them radioactive. So the rover will be sterilized but not radioactive.
This is similar to the process that irradiate food with gamma rays. You can store them in a perfectly sealed place without refrigeration and they a are safe to eat because they don't have bacteria and they don't have radiation. So this is a safe method. More info: https://en.wikipedia.org/wiki/Food_irradiation
---
Another different radiation process is to irradiate it with neutrons. It kills the bacteria but it also may make some nuclei radioactive. (I don't know the necessary doses, so perhaps this may be safe, but I'd be much more careful. Something like this is used to treat cancer. Also, this don't produce a lot of radioactive atoms, and the rover is small, so the radioactive material will be not too much. Anyway, as I said before, I'd be much more careful.)
---
Another possibility is mixing the food (for example a tea) with some radioactive material (for example plutonium). This kill the bacteria but also may kill whoever takes it. If you are very careful with the doses, you may use something like this for medicine applications (for example with radioactive iodine). But I guess that if the dose is low enough not to kill the patient, it will not kill all the bacteria. This is definitively not the method they may use to sterilize a rover.