How to add logo to rss feed

The code you posted is missing an ending }

here is a fixed and tested version of that code, so if you still get errors they are coming from another place

function addRssImage() {
  echo "<image>
    <title>My Title</title>
    <url>" . get_bloginfo('template_directory') . "/images/logo.png</url>
    <link>" . get_bloginfo('url') ."</link>
    <width>300</width>
    <height>60</height>
    <description>MyDomain.com</description>
    </image>";
}
add_action('rss2_head', 'addRssImage');