From: Pablo Neira Ayuso <[email protected]>

Fix a leak in the tests: The ->sign_link callback is reponsible
for releasing the msgb.
---
 tests/e1inp_ipa_bsc_test.c |    1 +
 tests/e1inp_ipa_bts_test.c |    1 +
 2 files changed, 2 insertions(+)

diff --git a/tests/e1inp_ipa_bsc_test.c b/tests/e1inp_ipa_bsc_test.c
index b447893..b2fb11c 100644
--- a/tests/e1inp_ipa_bsc_test.c
+++ b/tests/e1inp_ipa_bsc_test.c
@@ -191,6 +191,7 @@ static int sign_link(struct msgb *msg)
                LOGP(DBSCTEST, LOGL_ERROR, "Unknown signallin message.\n");
                break;
        }
+       msgb_free(msg);
        return ret;
 }
 
diff --git a/tests/e1inp_ipa_bts_test.c b/tests/e1inp_ipa_bts_test.c
index f885c5c..31aac95 100644
--- a/tests/e1inp_ipa_bts_test.c
+++ b/tests/e1inp_ipa_bts_test.c
@@ -151,6 +151,7 @@ static int sign_link(struct msgb *msg)
                LOGP(DBTSTEST, LOGL_ERROR, "Unknown signalling message.\n");
                break;
        }
+       msgb_free(msg);
        return ret;
 }
 
-- 
1.7.10.4


Reply via email to