<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6927">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_pubsub: Resolve potential crash in allocate_subscription.<br><br>When allocate_subscription fails to initialize fields of the new sub it<br>calls destroy_subscription.<br><br>Change-Id: I5b79c915ec216dc00c13c1e4172137864a4bec85<br>---<br>M res/res_pjsip_pubsub.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/27/6927/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c<br>index a1bfbb7..62b1879 100644<br>--- a/res/res_pjsip_pubsub.c<br>+++ b/res/res_pjsip_pubsub.c<br>@@ -1089,7 +1089,7 @@<br> static void destroy_subscription(struct ast_sip_subscription *sub)<br> {<br>   ast_debug(3, "Destroying SIP subscription from '%s->%s'\n",<br>-             sub->tree->endpoint ? ast_sorcery_object_get_id(sub->tree->endpoint) : "Unknown",<br>+              sub->tree && sub->tree->endpoint ? ast_sorcery_object_get_id(sub->tree->endpoint) : "Unknown",<br>               sub->resource);<br> <br>         ast_free(sub->body_text);<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6927">change 6927</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6927"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I5b79c915ec216dc00c13c1e4172137864a4bec85 </div>
<div style="display:none"> Gerrit-Change-Number: 6927 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>