From ecb39ef51c90cd1733282fb7c6472da258bf8aca Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 17 Feb 2020 18:34:39 +0100 Subject: [PATCH] fix --- src/mhd/mhd_legal.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mhd/mhd_legal.c b/src/mhd/mhd_legal.c index 5af946d8f..00a5e678c 100644 --- a/src/mhd/mhd_legal.c +++ b/src/mhd/mhd_legal.c @@ -555,6 +555,16 @@ TALER_MHD_legal_load (const struct GNUNET_CONFIGURATION_Handle *cfg, return NULL; } d = opendir (path); + if (NULL == d) + { + GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_WARNING, + section, + diroption, + "Could not open directory"); + GNUNET_free (legal->terms_etag); + GNUNET_free (legal); + return NULL; + } for (struct dirent *de = readdir (d); NULL != de; de = readdir (d))