From fe8605ed5b31d6dc6be485e3c58006410667c26d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 7 Jul 2015 15:48:27 -0700 Subject: [PATCH] Fix crash accessing freed memory That one should have been quite obvious. Signed-off-by: Dirk Hohndel --- load-git.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/load-git.c b/load-git.c index d277ccea3..649663f2d 100644 --- a/load-git.c +++ b/load-git.c @@ -209,7 +209,7 @@ static void parse_dive_location(char *line, struct membuffer *str, void *_dive) } else { // we already had a dive site linked to the dive if (same_string(ds->name, "")) { - ds->name = name; + ds->name = strdup(name); } else { // and that dive site had a name. that's weird - if our name is different, add it to the notes if (!same_string(ds->name, name))