diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2019-10-26 14:56:45 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-10-26 19:17:53 -0700 |
commit | 0b47757f2ac93ea39b622c3553fd7a06d13f8e29 (patch) | |
tree | f759f3e19cd77832368404761e50ab8bfc6a2fe0 /core/datatrak.c | |
parent | fdf03966d435d8582642277f811c7aea86c86c15 (diff) | |
download | subsurface-0b47757f2ac93ea39b622c3553fd7a06d13f8e29.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'core/datatrak.c')
-rw-r--r-- | core/datatrak.c | 3 |
1 files changed, 1 insertions, 2 deletions
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 |