Close FD before returning
authorAlan T. DeKok <aland@freeradius.org>
Wed, 15 May 2013 22:11:32 +0000 (18:11 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 15 May 2013 22:11:32 +0000 (18:11 -0400)
src/modules/rlm_linelog/rlm_linelog.c

index 0d7e5e0..801287d 100644 (file)
@@ -310,7 +310,7 @@ static rlm_rcode_t do_linelog(void *instance, REQUEST *request)
                
                if (write(fd, line, strlen(line)) < 0) {
                        EDEBUG("rlm_linelog: Failed writing: %s", strerror(errno));
-                       
+                       close(fd);
                        return RLM_MODULE_FAIL;
                }