]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Call closedir() on error
authorAlan T. DeKok <aland@freeradius.org>
Wed, 19 Oct 2011 15:34:01 +0000 (17:34 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 19 Oct 2011 15:34:01 +0000 (17:34 +0200)
src/main/client.c

index b4069438f399ce3c8f5e0d98eba845afdeebe609..5bfd5297539a50d4aca8c20235d849a2e2889c67 100644 (file)
@@ -874,6 +874,7 @@ RADCLIENT_LIST *clients_parse_section(CONF_SECTION *section)
                                        cf_log_err(cf_sectiontoitem(cs),
                                                   "Failed reading client file \"%s\"", buf2);
                                        client_free(c);
+                                       closedir(dir);
                                        return NULL;
                                }
 
@@ -883,6 +884,7 @@ RADCLIENT_LIST *clients_parse_section(CONF_SECTION *section)
                                if (!client_validate(clients, c, dc)) {
                                        
                                        client_free(c);
+                                       closedir(dir);
                                        return NULL;
                                }
                        } /* loop over the directory */