]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Call globfree() if glob() returns error.
authorAlan T. DeKok <aland@freeradius.org>
Sat, 28 Jul 2012 14:32:19 +0000 (10:32 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sat, 28 Jul 2012 14:32:19 +0000 (10:32 -0400)
Closes bug #207.

glob may PARTIALLY fill out the data before returning error
(sigh)

src/main/detail.c

index c28bad7b9c2f85e81beb4c07186b390fa1d49742..fe6f4d99bef19584d1d3360569b7bbbc5f17b782 100644 (file)
@@ -213,6 +213,7 @@ static int detail_open(rad_listen_t *this)
 
                        memset(&files, 0, sizeof(files));
                        if (glob(filename, 0, NULL, &files) != 0) {
+                               globfree(&files);
                                return 0;
                        }