<p>Kevin Harwell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/5832">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_transport_websocket: Add NULL check in get_write_timeout<br><br>Added check for NULL return value when calling<br>ast_sorcery_retrieve_by_id in function get_write_timeout<br><br>ASTERISK-27046<br><br>Change-Id: I9357717278da631c3a1cb502c412693929b0cb41<br>---<br>M res/res_pjsip_transport_websocket.c<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/32/5832/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip_transport_websocket.c b/res/res_pjsip_transport_websocket.c<br>index b3e63fc..cdda8c1 100644<br>--- a/res/res_pjsip_transport_websocket.c<br>+++ b/res/res_pjsip_transport_websocket.c<br>@@ -302,10 +302,14 @@<br> <br>                 for (; (transport_state = ao2_iterator_next(&it_transport_states)); ao2_cleanup(transport_state)) {<br>                       struct ast_sip_transport *transport;<br>+<br>                       if (transport_state->type != AST_TRANSPORT_WS && transport_state->type != AST_TRANSPORT_WSS) {<br>                          continue;<br>                     }<br>                     transport = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "transport", transport_state->id);<br>+                        if (!transport) {<br>+                            continue;<br>+                    }<br>                     ast_debug(5, "Found %s transport with write timeout: %d\n",<br>                                 transport->type == AST_TRANSPORT_WS ? "WS" : "WSS",<br>                            transport->write_timeout);<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/5832">change 5832</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/5832"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I9357717278da631c3a1cb502c412693929b0cb41 </div>
<div style="display:none"> Gerrit-Change-Number: 5832 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jørgen H <asterisk.org@hovland.cx> </div>