From 855703e93627e571f7172085c848ec5abbf2188b Mon Sep 17 00:00:00 2001 From: Carlo Vallati Date: Thu, 31 Mar 2016 10:09:47 +0200 Subject: [PATCH] Fixed a bug into tsch-schedule - tsch_schedule_add_link that causes deadlock if a new link cannot be created --- core/net/mac/tsch/tsch-schedule.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/net/mac/tsch/tsch-schedule.c b/core/net/mac/tsch/tsch-schedule.c index 8b15e0faf..e0028c492 100644 --- a/core/net/mac/tsch/tsch-schedule.c +++ b/core/net/mac/tsch/tsch-schedule.c @@ -191,6 +191,7 @@ tsch_schedule_add_link(struct tsch_slotframe *slotframe, l = memb_alloc(&link_memb); if(l == NULL) { PRINTF("TSCH-schedule:! add_link memb_alloc failed\n"); + tsch_release_lock(); } else { static int current_link_handle = 0; struct tsch_neighbor *n;