Skip to content

Commit

Permalink
guard against null pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Murphy committed May 4, 2009
1 parent ad20a91 commit 8a12a33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lwbt/hci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,7 @@ void hci_event_handler(struct pbuf *p)
if(link->connhdl == connhdl) break;
}

q = link->p;
q = link == NULL ? NULL : link->p;
/* Queued packet present? */
if (q != NULL) {
/* NULL attached buffer immediately */
Expand Down

0 comments on commit 8a12a33

Please sign in to comment.