Re: [PATCH] NFC: add NULL checks to avoid potential NULL pointer dereference

2017-06-22 Thread Samuel Ortiz
On Tue, May 30, 2017 at 03:43:07PM -0500, Gustavo A. R. Silva wrote: > NULL checks at line 457: if (!link0 || !link1) {, implies that both > pointers link0 and link1 might be NULL. > Function nfcsim_link_free() dereference pointers link0 and link1. > Add NULL checks before calling nfcsim_link_free(

[PATCH] NFC: add NULL checks to avoid potential NULL pointer dereference

2017-05-30 Thread Gustavo A. R. Silva
NULL checks at line 457: if (!link0 || !link1) {, implies that both pointers link0 and link1 might be NULL. Function nfcsim_link_free() dereference pointers link0 and link1. Add NULL checks before calling nfcsim_link_free() to avoid a potential NULL pointer dereference. Addresses-Coverity-ID: 1364