msm: camera: sync: Flush work queue before close
When cam_sync_close() is called, make sure all pending
work queues have finished by flushing the work queue. This
will ensure that any callback structs that are freed while
destroying are not accessed by the work running in the queue.
Not doing so will result in a use after free when the work in
the work queue gets scheduled.
Change-Id: Ibf857026865e9ff7e8ea50acc29c06f2e1c05931
Signed-off-by: Seemanta Dutta <seemanta@codeaurora.org>
Loading
Please register or sign in to comment