netmap_mem_unmap: fix NULL pointer dereference
MFC after: 3 days
This commit is contained in:
parent
b616c3e0b2
commit
f1f3c50834
@ -1523,11 +1523,12 @@ static int
|
||||
netmap_mem_unmap(struct netmap_obj_pool *p, struct netmap_adapter *na)
|
||||
{
|
||||
int i, lim = p->objtotal;
|
||||
struct netmap_lut *lut = &na->na_lut;
|
||||
struct netmap_lut *lut;
|
||||
|
||||
if (na == NULL || na->pdev == NULL)
|
||||
return 0;
|
||||
|
||||
lut = &na->na_lut;
|
||||
#if defined(__FreeBSD__)
|
||||
/* On FreeBSD mapping and unmapping is performed by the txsync
|
||||
* and rxsync routine, packet by packet. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user