qed: prevent possible double-frees of the chains
Zero-initialize chain on qed_chain_free(), so it couldn't be freed twice and provoke undefined behaviour. Signed-off-by: Alexander Lobakin <alobakin@marvell.com> Signed-off-by: Igor Russkikh <irusskikh@marvell.com> Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a08c9b2c7c
commit
96ca4c50c7
|
@ -92,8 +92,10 @@ void qed_chain_free(struct qed_dev *cdev, struct qed_chain *chain)
|
|||
qed_chain_free_pbl(cdev, chain);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
return;
|
||||
}
|
||||
|
||||
qed_chain_init_mem(chain, NULL, 0);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in New Issue