From 0b47757f2ac93ea39b622c3553fd7a06d13f8e29 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 26 Oct 2019 14:56:45 -0400 Subject: Cleanup: unconditionally call free While this is debatably correct, free will happily accept (and ignore the NULL pointer), so let's just always call it and make Coverity happy. Fixes CID 45163 Signed-off-by: Dirk Hohndel --- core/datatrak.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/datatrak.c') diff --git a/core/datatrak.c b/core/datatrak.c index 27e1ec4bb..763b8cc8b 100644 --- a/core/datatrak.c +++ b/core/datatrak.c @@ -462,8 +462,7 @@ static unsigned char *dt_dive_parser(unsigned char *runner, struct dive *dt_dive dt_dive->notes = memcpy(dt_dive->notes, buffer, len); free(tmp_string1); } - if (tmp_notes_str != NULL) - free(tmp_notes_str); + free(tmp_notes_str); /* * Alarms 1 and Alarms2 - Bit tables - Not in Subsurface, we use the profile -- cgit v1.2.3-70-g09d2