Re: [PATCH] ch: set driver to NULL after freeing it

2021-06-07 Thread Michal Prívozník
On 6/4/21 5:01 PM, Daniel P. Berrangé wrote: > If the chStateInitialize method fails, we call chStateCleanup > which free's all global state. It fails to set the global > 'ch_driver' to NULL, however, so a later attempt to open the > cloud hypervisor driver will succeed and then crash attempting >

[PATCH] ch: set driver to NULL after freeing it

2021-06-04 Thread Daniel P . Berrangé
If the chStateInitialize method fails, we call chStateCleanup which free's all global state. It fails to set the global 'ch_driver' to NULL, however, so a later attempt to open the cloud hypervisor driver will succeed and then crash attempting to access freed memory. Signed-off-by: Daniel P.