DC Barrel + Battery schematic
That should work fine. Keep in mind that both diodes will drop some of your voltage. 

When you have your wall wart plugged in you'll have 12V - diode drop at the input to the regulator, which will force D2 to be reversed biased (because you're using a 9V battery).  If you unplug the wall-wart then D2 will become forward biased and you'll have 9V - diode drop at the input to your regulator.   I don't know what your output voltage is, but just make sure that the diode drop won't botch it (e.g. look at the datasheet of your regulator and make sure that the drop out voltage criteria is OK given the diode drop).