aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2012-08-22 14:01:49 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2012-08-30 21:50:30 +0200
commit5a8cca3a1c25947b5f7a4ede92b7ae237c708e02 (patch)
treeb99bb0393aec21d4fe5b5fa6021dce394463d494 /tests
parent6cc3f92ea415736ed2461d5ae15eef82e72c2200 (diff)
tests: e1inp_ipa_bsc_test: fix crash
The sequence to trigger the crash was: 1) establish a full A-bis IPA link (both OML and RSL correctly established and ID_RESP received from BTS). 2) nc 127.0.0.1 3002 # establish OML link only I forgot to set to NULL the oml and rsl links we're using. Otherwise, the test calls e1inp_sign_link_destroy(rsl) which does not exists.
Diffstat (limited to 'tests')
-rw-r--r--tests/e1inp_ipa_bsc_test.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/e1inp_ipa_bsc_test.c b/tests/e1inp_ipa_bsc_test.c
index 424c87b..a0e5653 100644
--- a/tests/e1inp_ipa_bsc_test.c
+++ b/tests/e1inp_ipa_bsc_test.c
@@ -62,10 +62,14 @@ sign_link_up(void *dev, struct e1inp_line *line, enum e1inp_sign_type type)
static void sign_link_down(struct e1inp_line *line)
{
LOGP(DBSCTEST, LOGL_NOTICE, "signal link has been closed\n");
- if (oml_sign_link)
+ if (oml_sign_link) {
e1inp_sign_link_destroy(oml_sign_link);
- if (rsl_sign_link)
+ oml_sign_link = NULL;
+ }
+ if (rsl_sign_link) {
e1inp_sign_link_destroy(rsl_sign_link);
+ rsl_sign_link = NULL;
+ }
}
static void fill_om_hdr(struct abis_om_hdr *oh, uint8_t len)