summaryrefslogtreecommitdiffstats
path: root/libdivecomputer.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-03-08 17:27:33 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-03-08 17:27:33 -0800
commitb6bbfdcc5f1d90d00ccc0244e5e9792558d25abd (patch)
tree7704025448ffd23122a854303ed4f069a41d58fc /libdivecomputer.c
parenteef3d63de63ef4915ebf4d77e2940b522d971b4f (diff)
downloadsubsurface-b6bbfdcc5f1d90d00ccc0244e5e9792558d25abd.tar.gz
Avoid calling free on uninitialized dive variable
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r--libdivecomputer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c
index f7fff8285..309605e56 100644
--- a/libdivecomputer.c
+++ b/libdivecomputer.c
@@ -392,7 +392,7 @@ static int dive_cb(const unsigned char *data, unsigned int size,
device_data_t *devdata = userdata;
dc_datetime_t dt = { 0 };
struct tm tm;
- struct dive *dive;
+ struct dive *dive = NULL;
/* reset the deco / ndl data */
ndl = stoptime = stopdepth = 0;