<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/25777">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">e1inp_input: Fix e1inp_line_clone removing original line from global list when freed<br><br>Since a recent commit (see hash below), e1_input.c code was fixed to<br>release the line from the global line list (e1inp_line_list) before<br>freeing the object. However, the change didn't have into account that<br>there were cloned lines from the original one which had a duplicate of<br>the original line->list. Hence, whenver a clone was freed, it actually<br>removed the original line from the global list.<br><br>Since the original line is the one actually holding the permanent<br>reference due to being configured over VTY, let's fix e1inp_line_clone<br>to reset the clone->list so that whenever it is freed it doesn't affect<br>the original line.<br><br>Fixes: 49924f0a79db69c7e180543299a9e1078d5c16ac<br>Related: SYS#5642<br>Change-Id: I0627da0d28057649b494e2bd83b283b09fb9a2d7<br>---<br>M src/e1_input.c<br>1 file changed, 2 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/77/25777/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/e1_input.c b/src/e1_input.c</span><br><span>index 9fb8a3b..6507835 100644</span><br><span>--- a/src/e1_input.c</span><br><span>+++ b/src/e1_input.c</span><br><span>@@ -563,6 +563,8 @@</span><br><span>               .use_cb = e1inp_line_use_cb,</span><br><span>                 .use_counts = {0},</span><br><span>   };</span><br><span style="color: hsl(120, 100%, 40%);">+    /* initialize list so it can be safely deleted without affecting original line */</span><br><span style="color: hsl(120, 100%, 40%);">+     INIT_LLIST_HEAD(&clone->list);</span><br><span>        e1inp_line_get2(clone, use); /* Clone is used internally for bfd */</span><br><span>  return clone;</span><br><span> }</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-abis/+/25777">change 25777</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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.osmocom.org/c/libosmo-abis/+/25777"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-abis </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I0627da0d28057649b494e2bd83b283b09fb9a2d7 </div>
<div style="display:none"> Gerrit-Change-Number: 25777 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>