src.ctf.fs: don't call ds_file_munmap on failure in ds_file_mmap_next
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 5 Nov 2019 20:06:52 +0000 (15:06 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 15 Nov 2019 18:08:12 +0000 (13:08 -0500)
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 <simon.marchi@efficios.com>
src/plugins/ctf/fs-src/data-stream-file.c

index 1dacf230e5913e58a1d01881f569d81fd49778a1..0234a8f8abb7c37d3af7d72cf40348176dfc8426 100644 (file)
@@ -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;
This page took 0.024861 seconds and 4 git commands to generate.