<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - PulseAudio crashes when remote device is unpaired during A2DP streaming"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89672#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - PulseAudio crashes when remote device is unpaired during A2DP streaming"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89672">bug 89672</a>
              from <span class="vcard"><a class="email" href="mailto:david.henningsson@canonical.com" title="David Henningsson <david.henningsson@canonical.com>"> <span class="fn">David Henningsson</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=114580" name="attach_114580" title="Fix: Prevent calling pa_rtpoll_free() for a NULL rtpoll">attachment 114580</a> <a href="attachment.cgi?id=114580&action=edit" title="Fix: Prevent calling pa_rtpoll_free() for a NULL rtpoll">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=89672&attachment=114580'>[review]</a>
Fix: Prevent calling pa_rtpoll_free() for a NULL rtpoll

Review of <span class=""><a href="attachment.cgi?id=114580" name="attach_114580" title="Fix: Prevent calling pa_rtpoll_free() for a NULL rtpoll">attachment 114580</a> <a href="attachment.cgi?id=114580&action=edit" title="Fix: Prevent calling pa_rtpoll_free() for a NULL rtpoll">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=89672&attachment=114580'>[review]</a>:
-----------------------------------------------------------------

Sorry for the slow reply. Are you 100% certain that messages dispatched by
pa_thread_mq_done will not need the rtpoll? If not, perhaps the following is
better:

    if (u->rtpoll)
        pa_thread_mq_done(&u->thread_mq); 
    /* pa_thread_mq_done might recurse into stop_thread again, hence this extra
"if (u->rtpoll)" check */
    if (u->rpoll) {
        pa_rtpoll_free(u->rtpoll);
        u->rtpoll = NULL;
    }</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>