diff options
| author | bings <bings@codeaurora.org> | 2017-10-24 15:22:09 +0800 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-10-26 00:44:03 -0700 |
| commit | f50fc6441c6e991ab8f13a5b08880f5207785d88 (patch) | |
| tree | a63a70ef9639a28fce5b804e64559c5f7b02e58a | |
| parent | 497967be05bec8fdd633da471b57d6269a69729f (diff) | |
qcacmn: Free sdio global variables scn, ol_sc in hif_sdio_close
When BMI failed in sdio, hif_sdio_dev->claimed_ctx is not set as valid
value. Then scn, ol_sc can't be freed through hif_disable_bus as usual.
To fix this memory leak, free scn, ol_sc in hif_sdio_close.
Change-Id: I96b9b7c86ea6e84a32eec1c57c27ef042673e2e1
CRs-Fixed: 2131452
| -rw-r--r-- | hif/src/sdio/if_sdio.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hif/src/sdio/if_sdio.c b/hif/src/sdio/if_sdio.c index b80a851e1f23..cfa7e7813737 100644 --- a/hif/src/sdio/if_sdio.c +++ b/hif/src/sdio/if_sdio.c @@ -364,6 +364,15 @@ int hif_sdio_bus_resume(struct hif_softc *hif_ctx) */ void hif_sdio_close(struct hif_softc *hif_sc) { + if (ol_sc) { + qdf_mem_free(ol_sc); + ol_sc = NULL; + } + + if (scn) { + qdf_mem_free(scn); + scn = NULL; + } } /** |
