From 61f556e4a8e1cf8b9da17995ebcf2a37a1fee9f1 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Oct 28 2011 19:38:31 +0000 Subject: - don't forget to close that file on that error-return path --- diff --git a/src/util.c b/src/util.c index 43d377f..c77e3ce 100644 --- a/src/util.c +++ b/src/util.c @@ -60,6 +60,7 @@ read_config_file(const char *filename) /* stat() the file so we know the size and can pre-allocate the right * amount of memory. */ if (fstat(fd, &st) == -1) { + close(fd); cm_log(1, "Cannot stat() configuration file \"%s\": %s.\n", filename, strerror(errno)); return NULL;