Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void sorcery_object_wizard_destructor(void *obj)
- {
- struct ast_sorcery_object_wizard *object_wizard = obj;
- if (object_wizard->data) {
- object_wizard->wizard->close(object_wizard->data); //<==
- }
- if (object_wizard->wizard) { //<==
- ast_module_unref(object_wizard->wizard->module);
- }
- ao2_cleanup(object_wizard->wizard); //<==
- }
- This suspicious code was found in Asterisk project by PVS-Studio static code analyzer.
- Warning message is:
- V595 The 'object_wizard->wizard' pointer was utilized before it was verified against nullptr. Check lines: 683, 686. sorcery.c 683
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement