aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-07-10 22:11:42 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-10 13:25:12 -0700
commit1a8e8be3a96380d39e4fc3fa79b5a24858f71deb (patch)
tree5adca4871e9a098b05771b74e1ce6b9a173d4eff
parent6b4dd8d597f4aa52599305dfaf5af19054b4422c (diff)
downloadsubsurface-1a8e8be3a96380d39e4fc3fa79b5a24858f71deb.tar.gz
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>
-rw-r--r--dive.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index 349bc104a..683fbb836 100644
--- a/dive.c
+++ b/dive.c
@@ -2466,6 +2466,7 @@ void make_first_dc()
while (dc && dc->next != cur_dc)
dc = dc->next;
if (!dc) {
+ free(newdc);
fprintf(stderr, "data inconsistent: can't find the current DC");
return;
}