Was leaking on cf_file_input() when don't have write permission
authorJorge Pereira <jpereiran@gmail.com>
Thu, 25 Jun 2015 20:49:31 +0000 (17:49 -0300)
committerJorge Pereira <jpereiran@gmail.com>
Thu, 25 Jun 2015 20:49:31 +0000 (17:49 -0300)
src/main/conffile.c

index 83394f2..97da783 100644 (file)
@@ -387,6 +387,7 @@ static bool cf_file_input(CONF_SECTION *cs, char const *filename)
        if ((file->buf.st_mode & S_IWOTH) != 0) {
                ERROR("Configuration file %s is globally writable.  "
                      "Refusing to start due to insecure configuration.", filename);
+               talloc_free(file);
                return false;
        }
 #endif