diff --git a/README.md b/README.md index 61b9562f..7efad14d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # DNS Statistics Collector -[![Total alerts](https://img.shields.io/lgtm/alerts/g/DNS-OARC/dsc.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/DNS-OARC/dsc/alerts/) [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=dns-oarc%3Adsc&metric=bugs)](https://sonarcloud.io/dashboard?id=dns-oarc%3Adsc) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=dns-oarc%3Adsc&metric=security_rating)](https://sonarcloud.io/dashboard?id=dns-oarc%3Adsc) +[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=dns-oarc%3Adsc&metric=bugs)](https://sonarcloud.io/summary/new_code?id=dns-oarc%3Adsc) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=dns-oarc%3Adsc&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=dns-oarc%3Adsc) DNS Statistics Collector (DSC) is a tool used for collecting and exploring statistics from busy DNS servers. It can be set up to run on or near diff --git a/src/config_hooks.c b/src/config_hooks.c index 2b4d31f5..47b3305e 100644 --- a/src/config_hooks.c +++ b/src/config_hooks.c @@ -656,11 +656,15 @@ int load_knowntlds(const char* file) if (!(new_KnownTLDS = xrealloc(new_KnownTLDS, (new_size + 1) * sizeof(char*)))) { dsyslog(LOG_ERR, "out of memory"); + free(buffer); + fclose(fp); return 0; } new_KnownTLDS[new_size] = xstrdup(buffer); if (!new_KnownTLDS[new_size]) { dsyslog(LOG_ERR, "out of memory"); + free(buffer); + fclose(fp); return 0; } new_size++;