Gunmen have raided a hospital in the northern Iraqi city of Kirkuk , freeing a wounded man who was detained for plotting to kill a judge involved in Saddam Hussein 's trial .