aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/abis.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-06-08 20:45:25 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-06-12 15:16:41 +0200
commitc8086c317e8554628d0d967740a131c8b7dbd15e (patch)
tree10e77bdb5c6e09ab3bd7c4ebc77772d785c699e7 /src/common/abis.c
parent0bf87ccc3e43fb3ed638b6991563a297fd8b041a (diff)
abis.c: Grab reference to e1inp_line_get if already created
Since we are returning the pointer, it should always be grabbing a reference (find doesn't do it). In practice it's not much important since it is always created and not found. Change-Id: Ib84636663be2df33d497131c780b010b57f17e32
Diffstat (limited to 'src/common/abis.c')
-rw-r--r--src/common/abis.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/abis.c b/src/common/abis.c
index 44b8eff2..ab328700 100644
--- a/src/common/abis.c
+++ b/src/common/abis.c
@@ -280,8 +280,10 @@ struct e1inp_line *abis_open(struct gsm_bts *bts, char *dst_host,
bts_dev_info.location2 = model_name;
line = e1inp_line_find(0);
- if (!line)
- line = e1inp_line_create(0, "ipa");
+ if (line)
+ e1inp_line_get(line); /* We want a new reference for returned line */
+ else
+ line = e1inp_line_create(0, "ipa"); /* already comes with a reference */
if (!line)
return NULL;
e1inp_line_bind_ops(line, &line_ops);