From 0a09f8313ebd710d7565591f3419588a77fa1c38 Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Tue, 5 Apr 2011 14:02:02 -0700 Subject: [PATCH] Clean up file descriptors that we were leaving on the floor. --- libtest/server.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libtest/server.c b/libtest/server.c index 6cf05fa1..893a864c 100644 --- a/libtest/server.c +++ b/libtest/server.c @@ -121,11 +121,13 @@ void server_startup(server_startup_st *construct) int status; snprintf(construct->pid_file[x], FILENAME_MAX, "/tmp/memcached.pidXXXXXX"); - if (mkstemp(construct->pid_file[x]) == -1) + int fd; + if ((fd= mkstemp(construct->pid_file[x])) == -1) { perror("mkstemp"); return; } + close(fd); { char *var; -- 2.30.2