Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[modules] Clear context pointer after dropping reference
Not explicitly initializing the pointer to null value makes the validity of the initial state subject to compiler/libc level implementation details. And not clearing the pointer after dropping the reference can lead to hard to debug issues if the potentially state pointer is used later on. Explicitly initialize the context to null value and set it back to null after dropping the reference. Signed-off-by: Simo Piiroinen <email@example.com>
- Loading branch information
Showing with 6 additions and 3 deletions.
- +6 −3 src/usb_moded-modules.c