Tíquete #45411

Qt: spy_steal_shared() 'cd' leak

: 2022-08-21 19:03 Última Atualização: 2022-09-03 18:10

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
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
  • Dono Update from (Nenhum) to cazfi
  • Resolução Update from Nenhum to Accepted
2022-09-03 18:10 Updated by: cazfi
  • Estado Update from Aberto to Fechado
  • Resolução Update from Accepted to Fixed

Editar

Please login to add comment to this ticket » Login