From 1a8e8be3a96380d39e4fc3fa79b5a24858f71deb Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Thu, 10 Jul 2014 22:11:42 +0200 Subject: Fix potential leak of newdc in make_first_dc() Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- dive.c | 1 + 1 file changed, 1 insertion(+) 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; } -- cgit v1.2.3-70-g09d2