about summary refs log tree commit diff
path: root/support/support_run_diff.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-03-15 13:13:58 +0100
committerFlorian Weimer <fweimer@redhat.com>2017-03-15 13:33:40 +0100
commited3ea040bae8ef2cf131081124a1248a9fd3dca9 (patch)
treeaba1792fff5e2c4887d67198f91afb5cb1c8f8da /support/support_run_diff.c
parentf889e73f603dcf90b4db6a2065104a78c1a0e94d (diff)
downloadglibc-ed3ea040bae8ef2cf131081124a1248a9fd3dca9.tar.gz
glibc-ed3ea040bae8ef2cf131081124a1248a9fd3dca9.tar.xz
glibc-ed3ea040bae8ef2cf131081124a1248a9fd3dca9.zip
support: Add error checking to close system calls [BZ #21244]
Diffstat (limited to 'support/support_run_diff.c')
-rw-r--r--support/support_run_diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/support_run_diff.c b/support/support_run_diff.c
index 3085037a69..f5155de727 100644
--- a/support/support_run_diff.c
+++ b/support/support_run_diff.c
@@ -24,8 +24,8 @@
 #include <support/check.h>
 #include <support/support.h>
 #include <support/temp_file.h>
+#include <support/xunistd.h>
 #include <sys/wait.h>
-#include <xunistd.h>
 
 static char *
 write_to_temp_file (const char *prefix, const char *str)
@@ -36,7 +36,7 @@ write_to_temp_file (const char *prefix, const char *str)
   TEST_VERIFY_EXIT (fd >= 0);
   free (template);
   xwrite (fd, str, strlen (str));
-  TEST_VERIFY_EXIT (close (fd) == 0);
+  xclose (fd);
   return name;
 }