From: Alan T. DeKok Date: Sat, 28 Jul 2012 14:32:19 +0000 (-0400) Subject: Call globfree() if glob() returns error. X-Git-Tag: release_2_2_0~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1e058b7352908bac1026433d10f55dfb5ac8608;p=thirdparty%2Ffreeradius-server.git Call globfree() if glob() returns error. Closes bug #207. glob may PARTIALLY fill out the data before returning error (sigh) --- diff --git a/src/main/detail.c b/src/main/detail.c index c28bad7b9c2..fe6f4d99bef 100644 --- a/src/main/detail.c +++ b/src/main/detail.c @@ -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; }