<p>sungtae kim has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14448">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bridge.c: Fixed null pointer exception<br><br>If the bridge show all command could not get the bridge snapshot, it causes null pointer exception.<br>Fixed it to check the snapshot is null.<br><br>ASTERISK-28920<br><br>Change-Id: I3521fc1b832bfc69644d0833f2c78177e1e51f58<br>---<br>M main/bridge.c<br>1 file changed, 1 insertion(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/48/14448/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/bridge.c b/main/bridge.c</span><br><span>index c13cda2..fb7012d 100644</span><br><span>--- a/main/bridge.c</span><br><span>+++ b/main/bridge.c</span><br><span>@@ -5086,9 +5086,8 @@</span><br><span> struct ast_bridge_snapshot *snapshot = ast_bridge_get_snapshot(bridge);</span><br><span> char print_time[32];</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- ast_format_duration_hh_mm_ss(ast_tvnow().tv_sec - snapshot->creationtime.tv_sec, print_time, sizeof(print_time));</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> if (snapshot) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_format_duration_hh_mm_ss(ast_tvnow().tv_sec - snapshot->creationtime.tv_sec, print_time, sizeof(print_time));</span><br><span> ast_cli(a->fd, FORMAT_ROW,</span><br><span> snapshot->uniqueid,</span><br><span> snapshot->num_channels,</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14448">change 14448</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/14448"/><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-Change-Id: I3521fc1b832bfc69644d0833f2c78177e1e51f58 </div>
<div style="display:none"> Gerrit-Change-Number: 14448 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: sungtae kim <pchero21@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>