Syllo / nvtop

GPU & Accelerator process monitoring for AMD, Apple, Huawei, Intel, NVIDIA and Qualcomm
Other
7.98k stars 291 forks source link

Fix: initialize_device_info failed cause double free #98

Closed oToToT closed 3 years ago

oToToT commented 3 years ago

When initialize_device_info failed, it will free allocated memory and return 0. However, the caller might free the memory again and cause a double free problem.

Syllo commented 3 years ago

I see, this case was not handled properly. Thanks for the fix. Take care!