Avoid calling free on uninitialized dive variable

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-03-08 17:27:33 -08:00
parent eef3d63de6
commit b6bbfdcc5f

View file

@ -392,7 +392,7 @@ static int dive_cb(const unsigned char *data, unsigned int size,
device_data_t *devdata = userdata; device_data_t *devdata = userdata;
dc_datetime_t dt = { 0 }; dc_datetime_t dt = { 0 };
struct tm tm; struct tm tm;
struct dive *dive; struct dive *dive = NULL;
/* reset the deco / ndl data */ /* reset the deco / ndl data */
ndl = stoptime = stopdepth = 0; ndl = stoptime = stopdepth = 0;