From: Alan T. DeKok Date: Thu, 6 Sep 2012 09:11:02 +0000 (+0200) Subject: Close FD if there's nothing to log. Bug found by Coverity X-Git-Tag: release_3_0_0_beta0~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b452ba3aba765c52891ceec0ff68867cb39d81f0;p=thirdparty%2Ffreeradius-server.git Close FD if there's nothing to log. Bug found by Coverity --- diff --git a/src/modules/rlm_radutmp/rlm_radutmp.c b/src/modules/rlm_radutmp/rlm_radutmp.c index 873a3fa2f7e..2192c39e078 100644 --- a/src/modules/rlm_radutmp/rlm_radutmp.c +++ b/src/modules/rlm_radutmp/rlm_radutmp.c @@ -597,6 +597,7 @@ static int radutmp_checksimul(void *instance, REQUEST *request) *login = '\0'; radius_xlat(login, sizeof(login), inst->username, request, NULL); if (!*login) { + close(fd); return RLM_MODULE_NOOP; }