Fix: common: Unchecked return value of `closedir()`
[lttng-tools.git] / src / common / compat / directory-handle.c
index 4dad7b75744a7d81305910a3d86556cca3179bf1..95be9ec3d7cfeada460dad1238e1ca06dac53695 100644 (file)
@@ -1069,9 +1069,13 @@ struct rmdir_frame {
 static
 void rmdir_frame_fini(void *data)
 {
+       int ret;
        struct rmdir_frame *frame = data;
 
-       closedir(frame->dir);
+       ret = closedir(frame->dir);
+       if (ret == -1) {
+               PERROR("Failed to close directory stream");
+       }
 }
 
 static
This page took 0.025581 seconds and 5 git commands to generate.