任务单 #45411

Qt: spy_steal_shared() 'cd' leak

开放日期: 2022-08-21 19:03 最后更新: 2022-09-03 18:10

报告人:
属主:
类型:
状态:
关闭
组件:
里程碑:
优先:
5 - Medium
严重性:
5 - Medium
处理结果:
Fixed
文件:
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.

任务单历史 (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 (无) to cazfi
  • 处理结果 Update from to Accepted
2022-09-03 18:10 Updated by: cazfi
  • 状态 Update from 开启 to 关闭
  • 处理结果 Update from Accepted to Fixed

编辑

Please login to add comment to this ticket » 登录名