diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-03-08 17:27:33 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-03-08 17:27:33 -0800 |
commit | b6bbfdcc5f1d90d00ccc0244e5e9792558d25abd (patch) | |
tree | 7704025448ffd23122a854303ed4f069a41d58fc /libdivecomputer.c | |
parent | eef3d63de63ef4915ebf4d77e2940b522d971b4f (diff) | |
download | subsurface-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.c | 2 |
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; |