<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6380">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">rtp_engine: Prevent possible double free with DTLS config<br><br>ASTERISK-27225 #close<br>Reported by: Richard Kenner<br><br>Change-Id: I097b81734ef730f8603c0b972909d212a3a5cf89<br>---<br>M main/rtp_engine.c<br>1 file changed, 4 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/rtp_engine.c b/main/rtp_engine.c<br>index 11c1b93..d82bc49 100644<br>--- a/main/rtp_engine.c<br>+++ b/main/rtp_engine.c<br>@@ -2105,35 +2105,35 @@<br>                        return -1;<br>            }<br>     } else if (!strcasecmp(name, "dtlscertfile")) {<br>-            ast_free(dtls_cfg->certfile);<br>              if (!ast_strlen_zero(value) && !ast_file_is_readable(value)) {<br>                        ast_log(LOG_ERROR, "%s file %s does not exist or is not readable\n", name, value);<br>                  return -1;<br>            }<br>+            ast_free(dtls_cfg->certfile);<br>              dtls_cfg->certfile = ast_strdup(value);<br>    } else if (!strcasecmp(name, "dtlsprivatekey")) {<br>-          ast_free(dtls_cfg->pvtfile);<br>               if (!ast_strlen_zero(value) && !ast_file_is_readable(value)) {<br>                        ast_log(LOG_ERROR, "%s file %s does not exist or is not readable\n", name, value);<br>                  return -1;<br>            }<br>+            ast_free(dtls_cfg->pvtfile);<br>               dtls_cfg->pvtfile = ast_strdup(value);<br>     } else if (!strcasecmp(name, "dtlscipher")) {<br>               ast_free(dtls_cfg->cipher);<br>                dtls_cfg->cipher = ast_strdup(value);<br>      } else if (!strcasecmp(name, "dtlscafile")) {<br>-              ast_free(dtls_cfg->cafile);<br>                if (!ast_strlen_zero(value) && !ast_file_is_readable(value)) {<br>                        ast_log(LOG_ERROR, "%s file %s does not exist or is not readable\n", name, value);<br>                  return -1;<br>            }<br>+            ast_free(dtls_cfg->cafile);<br>                dtls_cfg->cafile = ast_strdup(value);<br>      } else if (!strcasecmp(name, "dtlscapath") || !strcasecmp(name, "dtlscadir")) {<br>-          ast_free(dtls_cfg->capath);<br>                if (!ast_strlen_zero(value) && !ast_file_is_readable(value)) {<br>                        ast_log(LOG_ERROR, "%s file %s does not exist or is not readable\n", name, value);<br>                  return -1;<br>            }<br>+            ast_free(dtls_cfg->capath);<br>                dtls_cfg->capath = ast_strdup(value);<br>      } else if (!strcasecmp(name, "dtlssetup")) {<br>                if (!strcasecmp(value, "active")) {<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6380">change 6380</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/6380"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I097b81734ef730f8603c0b972909d212a3a5cf89 </div>
<div style="display:none"> Gerrit-Change-Number: 6380 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>