mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
Merge "usb: f_fs: Fix Double free from ffs_data_clear"
This commit is contained in:
commit
ced73a7604
1 changed files with 4 additions and 4 deletions
|
|
@ -2012,14 +2012,17 @@ static void ffs_data_clear(struct ffs_data *ffs)
|
|||
ffs_epfiles_destroy(ffs->epfiles, ffs->eps_count);
|
||||
ffs->epfiles = NULL;
|
||||
}
|
||||
mutex_unlock(&ffs->mutex);
|
||||
|
||||
if (ffs->ffs_eventfd)
|
||||
eventfd_ctx_put(ffs->ffs_eventfd);
|
||||
|
||||
kfree(ffs->raw_descs_data);
|
||||
ffs->raw_descs_data = NULL;
|
||||
kfree(ffs->raw_strings);
|
||||
ffs->raw_strings = NULL;
|
||||
kfree(ffs->stringtabs);
|
||||
ffs->stringtabs = NULL;
|
||||
mutex_unlock(&ffs->mutex);
|
||||
}
|
||||
|
||||
static void ffs_data_reset(struct ffs_data *ffs)
|
||||
|
|
@ -2031,10 +2034,7 @@ static void ffs_data_reset(struct ffs_data *ffs)
|
|||
|
||||
ffs_data_clear(ffs);
|
||||
|
||||
ffs->raw_descs_data = NULL;
|
||||
ffs->raw_descs = NULL;
|
||||
ffs->raw_strings = NULL;
|
||||
ffs->stringtabs = NULL;
|
||||
|
||||
ffs->raw_descs_length = 0;
|
||||
ffs->fs_descs_count = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue