From: Simon Marchi Date: Tue, 5 Nov 2019 20:06:52 +0000 (-0500) Subject: src.ctf.fs: don't call ds_file_munmap on failure in ds_file_mmap_next X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=8b9fc36ad7daf88fead2b486a2932c98cffa414a src.ctf.fs: don't call ds_file_munmap on failure in ds_file_mmap_next It seems useless to call ds_file_munmap here. We can reach the error label either because: - the previous call to ds_file_munmap has failed, in which case there's no point in retrying - the mmap call returned MAP_FAILED, in which case there's no point un unmapping Change-Id: Ia11716a967047d32773ab67f51bcf7516489f183 Signed-off-by: Simon Marchi --- diff --git a/src/plugins/ctf/fs-src/data-stream-file.c b/src/plugins/ctf/fs-src/data-stream-file.c index 1dacf230..0234a8f8 100644 --- a/src/plugins/ctf/fs-src/data-stream-file.c +++ b/src/plugins/ctf/fs-src/data-stream-file.c @@ -125,7 +125,6 @@ enum ctf_msg_iter_medium_status ds_file_mmap_next( goto end; error: - ds_file_munmap(ds_file); ret = CTF_MSG_ITER_MEDIUM_STATUS_ERROR; end: return ret;