client/gui-qt/dialogs.cpp:2436:3: warning: Potential leak of memory pointed to by 'cd' [cplusplus.NewDeleteLeaks]
astr_free(&stra);
---
I think that comes from the fact that 'cd' is created outside the "if (pvictim)" -block, but e.g. 'cd->show_me();' is within that block so that there never is a dialog to close, and destroy.
This is not just a potential memory leak, but I think there a many other consequences as well. For examply I don't if 'is_more_user_input_needed = TRUE;' set earlier will ever get cleared when the dialog is not shown.
Clang analyzer on S3_0:
client/gui-qt/dialogs.cpp:2436:3: warning: Potential leak of memory pointed to by 'cd' [cplusplus.NewDeleteLeaks]
astr_free(&stra);
I think that comes from the fact that 'cd' is created outside the "if (pvictim)" -block, but e.g. 'cd->show_me();' is within that block so that there never is a dialog to close, and destroy.
This is not just a potential memory leak, but I think there a many other consequences as well. For examply I don't if 'is_more_user_input_needed = TRUE;' set earlier will ever get cleared when the dialog is not shown.