diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-07-07 15:48:27 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-07 15:48:27 -0700 |
commit | fe8605ed5b31d6dc6be485e3c58006410667c26d (patch) | |
tree | 998d5ce807793dd506368b4f1797ca413ccaa93f /load-git.c | |
parent | 4fc4bbd9bcec0b965f604cddfb4f479662cdc5ce (diff) | |
download | subsurface-fe8605ed5b31d6dc6be485e3c58006410667c26d.tar.gz |
Fix crash accessing freed memory
That one should have been quite obvious.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'load-git.c')
-rw-r--r-- | load-git.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |