mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Fix potential leak of newdc in make_first_dc()
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6b4dd8d597
commit
1a8e8be3a9
1 changed files with 1 additions and 0 deletions
1
dive.c
1
dive.c
|
@ -2466,6 +2466,7 @@ void make_first_dc()
|
||||||
while (dc && dc->next != cur_dc)
|
while (dc && dc->next != cur_dc)
|
||||||
dc = dc->next;
|
dc = dc->next;
|
||||||
if (!dc) {
|
if (!dc) {
|
||||||
|
free(newdc);
|
||||||
fprintf(stderr, "data inconsistent: can't find the current DC");
|
fprintf(stderr, "data inconsistent: can't find the current DC");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue