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>
This commit is contained in:
Dirk Hohndel 2019-10-26 14:56:45 -04:00
parent fdf03966d4
commit 0b47757f2a

View file

@ -462,7 +462,6 @@ static unsigned char *dt_dive_parser(unsigned char *runner, struct dive *dt_dive
dt_dive->notes = memcpy(dt_dive->notes, buffer, len); dt_dive->notes = memcpy(dt_dive->notes, buffer, len);
free(tmp_string1); free(tmp_string1);
} }
if (tmp_notes_str != NULL)
free(tmp_notes_str); free(tmp_notes_str);
/* /*