mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: Fix memory leak in plannernotes.c
dive->notes was overwritten without free()ing the old buffer. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
a4834e198d
commit
71d1e78db2
1 changed files with 1 additions and 0 deletions
|
@ -574,5 +574,6 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
|
|||
put_string(&buf, "</div>");
|
||||
finished:
|
||||
mb_cstring(&buf);
|
||||
free(dive->notes);
|
||||
dive->notes = detach_buffer(&buf);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue