In addition to that, make sure you update openssl and libopenssl to 1.0.1g (or equivalent) as well if you haven't already, and restart any affected services (like ssh). Patching bitcoind won't do you much good if you leave ssh and other services vulnerable, as attackers could simply attack your ssh/web/vpn/etc. service until they find a way into your system and attack or download the wallet from there.
This should be very easy for you to do. AFAIK Ubuntu will have backported the fix to all versions of ubuntu, including 12.04
I recommend just doing this:
sudo apt-get update
sudo apt-get upgrade
That should ensure you're safe from the OpenSSL bug, also make sure you download the updated version of Bitcoin.