emulex_oce: Fix PVS V595
Check 'mq' pointer against NULL before using it. Change-Id: I785940616c9ec9c0c168975388a728e88b36d1d8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2204 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
0d56abf253
commit
7eaa780a81
@@ -779,13 +779,13 @@ error:
|
|||||||
static void
|
static void
|
||||||
oce_mq_free(struct oce_mq *mq)
|
oce_mq_free(struct oce_mq *mq)
|
||||||
{
|
{
|
||||||
|
if (mq == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
POCE_SOFTC sc = (POCE_SOFTC) mq->parent;
|
POCE_SOFTC sc = (POCE_SOFTC) mq->parent;
|
||||||
struct oce_mbx mbx;
|
struct oce_mbx mbx;
|
||||||
struct mbx_destroy_common_mq *fwcmd;
|
struct mbx_destroy_common_mq *fwcmd;
|
||||||
|
|
||||||
if (!mq)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (mq->ring != NULL) {
|
if (mq->ring != NULL) {
|
||||||
oce_destroy_ring_buffer(sc, mq->ring);
|
oce_destroy_ring_buffer(sc, mq->ring);
|
||||||
mq->ring = NULL;
|
mq->ring = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user