Tíquete #45910

oblig_hard_req_reg() for zero action results

: 2022-10-18 03:07 Última Atualização: 2022-12-04 13:24

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
1

Details

Originally detected by valgrind as a memory leak: One of the oblig_hard_req_reg() calls has no target action results (list is immediately terminated by ACTRES_NONE). With zero users to begin with, nobody reduces its reference count and thus code to free it is never triggered.

It's likely that a more serious bug than tiny memory leak lurks there - certainly it was not created to be registered to no action.

It's the one about war with tile owner OR tile having no city.

Ticket History (3/6 Histories)

2022-10-18 03:07 Updated by: cazfi
  • New Ticket "oblig_hard_req_re() for zero action results" created
2022-10-18 07:23 Updated by: cazfi
  • Summary Updated
2022-10-30 15:02 Updated by: cazfi
  • Marco Update from (Nenhum) to 3.2.0
  • Componente Update from (Nenhum) to General
Comentário

Reply To cazfi

It's likely that a more serious bug than tiny memory leak lurks there - certainly it was not created to be registered to no action.

It's used in S3_1, for ACTRES_BOMBARD. It's no longer an obligatory bombard requirement in master. The oblig_hard_req_reg() call just wasn't removed when the only action previously registered to it stopped being registered to it.

2022-11-28 05:53 Updated by: cazfi
  • Dono Update from (Nenhum) to cazfi
  • Resolução Update from Nenhum to Accepted
2022-12-04 13:24 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