summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-06-26 15:07:06 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-26 18:50:22 -0700
commit9d51326e48c87c27ee6c79e967ab398a7dd04408 (patch)
treead28c44afc5464ebecc2bc0b633b97d1e91f988e
parent05c5bf0919d57102d5509b58cce0b9e6c527aa6c (diff)
downloadsubsurface-9d51326e48c87c27ee6c79e967ab398a7dd04408.tar.gz
Dive site rewrite: fix double free
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--divesite.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/divesite.c b/divesite.c
index 113f117ff..6e2d9353d 100644
--- a/divesite.c
+++ b/divesite.c
@@ -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;