<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 8, 2014 at 6:14 AM, Dan Williams <span dir="ltr"><<a href="mailto:dcbw@redhat.com" target="_blank">dcbw@redhat.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Tue, 2014-01-07 at 23:55 -0800, Ben Chan wrote:<br>
> This patch prevents connect_3gpp_context_complete_and_free from calling<br>
> 'g_object_unref (ctx->data)' when connect_3gpp finds no data port (i.e.<br>
> ctx->data is set to NULL).<br>
<br>
</div>There is "g_clear_object (&object)" which handles NULL and zeroes the<br>
location of the pointer too.  Saves a LoC here and there and sometimes<br>
looks cleaner.  No need to use that here, but for future reference.<br>
<span class="HOEnZb"><font color="#888888"><br>
Dan<br>
</font></span><div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>I've a second thought. Perhaps connect_3gpp should just call g_simple_async_result_report_error_in_idle if there is no data port available. That avoids creating an immediately throw-away Connect3gppContext and also makes the NULL check on ctx->data in connect_3gpp_context_complete_and_free unnecessary. How do you think?</div>

<div> </div></div><br></div></div>