diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-04-10 14:29:54 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-04-11 14:01:51 +0300 |
commit | 71d1e78db2435c74a3170a9fe0d3e4e0e6c946c2 (patch) | |
tree | 9cd773e89be7885122d253a1d183bf4d37be5151 /core/plannernotes.c | |
parent | a4834e198d55d50a44d6f80e2137777b64652ce7 (diff) | |
download | subsurface-71d1e78db2435c74a3170a9fe0d3e4e0e6c946c2.tar.gz |
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>
Diffstat (limited to 'core/plannernotes.c')
-rw-r--r-- | core/plannernotes.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/plannernotes.c b/core/plannernotes.c index eb6dc018f..1b28252d3 100644 --- a/core/plannernotes.c +++ b/core/plannernotes.c @@ -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); } |