diff options
Diffstat (limited to 'example')
-rw-r--r-- | example/passthrough.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/example/passthrough.c b/example/passthrough.c index 85cca5e..08273ff 100644 --- a/example/passthrough.c +++ b/example/passthrough.c @@ -477,8 +477,10 @@ static ssize_t xmp_copy_file_range(const char *path_in, if (res == -1) res = -errno; - close(fd_in); - close(fd_out); + if (fi_out == NULL) + close(fd_out); + if (fi_in == NULL) + close(fd_in); return res; } |