From: Steve Underwood Date: Wed, 30 Apr 2014 14:51:59 +0000 (+0800) Subject: Another couple of Coverity related cleanups X-Git-Tag: v1.5.12~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ebc79457e3d0a07c2e9af2410a72936a4e46aa2;p=thirdparty%2Ffreeswitch.git Another couple of Coverity related cleanups --- diff --git a/libs/spandsp/src/schedule.c b/libs/spandsp/src/schedule.c index 6e38e6bd94..93916dea1d 100644 --- a/libs/spandsp/src/schedule.c +++ b/libs/spandsp/src/schedule.c @@ -156,9 +156,11 @@ SPAN_DECLARE(int) span_schedule_release(span_sched_state_t *s) SPAN_DECLARE(int) span_schedule_free(span_sched_state_t *s) { - span_schedule_release(s); if (s) + { + span_schedule_release(s); span_free(s); + } return 0; } /*- End of function --------------------------------------------------------*/ diff --git a/libs/spandsp/src/t4_rx.c b/libs/spandsp/src/t4_rx.c index f14521b5f0..7a39dfd144 100644 --- a/libs/spandsp/src/t4_rx.c +++ b/libs/spandsp/src/t4_rx.c @@ -733,7 +733,10 @@ static int close_tiff_output_file(t4_rx_state_t *s) /* Try not to leave a file behind, if we didn't receive any pages to put in it. */ if (s->current_page == 0) - remove(s->tiff.file); + { + if (remove(s->tiff.file) < 0) + span_log(&s->logging, SPAN_LOG_WARNING, "%s: Failed to remove file.\n", s->tiff.file); + } span_free((char *) s->tiff.file); } s->tiff.file = NULL;