Skip to content

Commit

Permalink
Merge pull request #2419 from BytesGalore/lowpan_release_mutex_on_unk…
Browse files Browse the repository at this point in the history
…nown_iphc

sys/net/sixlowpan: prevent deadlock when no IPHC context is recognized
  • Loading branch information
Lotterleben committed Feb 10, 2015
2 parents d46d654 + c7eea4d commit 52d51a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sys/net/network_layer/sixlowpan/lowpan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,7 @@ void lowpan_iphc_decoding(uint8_t *data, uint8_t length, net_if_eui64_t *s_addr,

if (con == NULL) {
printf("ERROR: context not found\n");
mutex_unlock(&lowpan_context_mutex);
return;
}

Expand Down Expand Up @@ -1386,6 +1387,7 @@ void lowpan_iphc_decoding(uint8_t *data, uint8_t length, net_if_eui64_t *s_addr,

if (con == NULL) {
printf("ERROR: context not found\n");
mutex_unlock(&lowpan_context_mutex);
return;
}

Expand Down Expand Up @@ -1462,6 +1464,7 @@ void lowpan_iphc_decoding(uint8_t *data, uint8_t length, net_if_eui64_t *s_addr,

if (con == NULL) {
printf("ERROR: context not found\n");
mutex_unlock(&lowpan_context_mutex);
return;
}

Expand Down

0 comments on commit 52d51a7

Please sign in to comment.