Ticket #45411

Qt: spy_steal_shared() 'cd' leak

오픈 날짜: 2022-08-21 19:03 마지막 업데이트: 2022-09-03 18:10

Reporter:
소유자:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
3

Details

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.

Ticket History (3/8 Histories)

2022-08-21 19:03 Updated by: cazfi
  • New Ticket "Qt: spy_steal_shared() 'cd' leak" created
2022-08-21 19:41 Updated by: cazfi
2022-08-26 23:12 Updated by: cazfi
  • Details Updated
2022-08-26 23:37 Updated by: cazfi
  • 소유자 Update from (None) to cazfi
  • Resolution Update from None to Accepted
2022-09-03 18:10 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login