Skip to content
Commit d80cf1eb authored by Stephen Checkoway's avatar Stephen Checkoway Committed by Laurent Vivier
Browse files

block/pflash_cfi02: Fix memory leak and potential use-after-free



Don't dynamically allocate the pflash's timer. But do use timer_del in
an unrealize function to make sure that the timer can't fire after the
pflash_t has been freed.

Signed-off-by: default avatarStephen Checkoway <stephen.checkoway@oberlin.edu>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: default avatarWei Yang <richardw.yang@linux.intel.com>
Message-Id: <20190219153727.62279-1-stephen.checkoway@oberlin.edu>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent 7d9b68ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment