summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-12-08 02:16:59 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-12-08 02:16:59 -0800
commit4611ba9cdab555622a6ee8a37747cba443b2da25 (patch)
treee78b432a391bdbf3110e93338253a28beb55210e
parent7099c46a662042dc275bcaaa90750d11a2d89ac3 (diff)
parentaed8e81ec69fcff6a35841b724a18ca004beedce (diff)
Merge "diag: Free the memory in diagfwd_peripheral_exit()"
-rw-r--r--drivers/char/diag/diagfwd_peripheral.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/char/diag/diagfwd_peripheral.c b/drivers/char/diag/diagfwd_peripheral.c
index b7dff47623de..7e428ce972a8 100644
--- a/drivers/char/diag/diagfwd_peripheral.c
+++ b/drivers/char/diag/diagfwd_peripheral.c
@@ -911,6 +911,7 @@ void diagfwd_peripheral_exit(void)
uint8_t peripheral;
uint8_t type;
struct diagfwd_info *fwd_info = NULL;
+ int transport = 0;
diag_smd_exit();
diag_socket_exit();
@@ -933,7 +934,10 @@ void diagfwd_peripheral_exit(void)
driver->diagfwd_dci_cmd[peripheral] = NULL;
}
- kfree(early_init_info);
+ for (transport = 0; transport < NUM_TRANSPORT; transport++) {
+ kfree(early_init_info[transport]);
+ early_init_info[transport] = NULL;
+ }
}
int diagfwd_cntl_register(uint8_t transport, uint8_t peripheral, void *ctxt,