Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove target without accessing freed memory (opentibiabr#786)
This change addresses an issue where the function removeTarget was accessing a pointer after it had been freed by decrementing its reference counter. This was causing a use of memory after it was freed error. This ensures that the pointer is not accessed after it has been freed. Also moves the decrement reference counter line to the end of the function, making sure that the pointer is not accessed after it is freed.
- Loading branch information