Dive site rewrite: fix double free

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-06-26 15:07:06 -03:00 committed by Dirk Hohndel
parent 05c5bf0919
commit 9d51326e48

View file

@ -175,6 +175,9 @@ void clear_dive_site(struct dive_site *ds)
free(ds->name);
free(ds->notes);
free(ds->description);
ds->name = 0;
ds->notes = 0;
ds->description = 0;
ds->latitude.udeg = 0;
ds->longitude.udeg = 0;
ds->uuid = 0;