mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Fix crash accessing freed memory
That one should have been quite obvious. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4fc4bbd9bc
commit
fe8605ed5b
1 changed files with 1 additions and 1 deletions
|
@ -209,7 +209,7 @@ static void parse_dive_location(char *line, struct membuffer *str, void *_dive)
|
||||||
} else {
|
} else {
|
||||||
// we already had a dive site linked to the dive
|
// we already had a dive site linked to the dive
|
||||||
if (same_string(ds->name, "")) {
|
if (same_string(ds->name, "")) {
|
||||||
ds->name = name;
|
ds->name = strdup(name);
|
||||||
} else {
|
} else {
|
||||||
// and that dive site had a name. that's weird - if our name is different, add it to the notes
|
// 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))
|
if (!same_string(ds->name, name))
|
||||||
|
|
Loading…
Reference in a new issue