divesite.c: prevent double free()

Reported-by: Benjamin Fogel <nystire@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Lubomir I. Ivanov 2017-10-05 21:33:07 +03:00 committed by Dirk Hohndel
parent c127a92e8e
commit d96c47a1b9

View file

@ -314,7 +314,6 @@ void clear_dive_site(struct dive_site *ds)
free(ds->name);
free(ds->notes);
free(ds->description);
free(ds->name);
ds->name = 0;
ds->notes = 0;
ds->description = 0;