summaryrefslogtreecommitdiff
path: root/src/mhd
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-02-26 12:18:58 +0100
committerChristian Grothoff <christian@grothoff.org>2021-02-26 12:18:58 +0100
commit15ed6ffb07e2c1b87f08a1b168e76c743a2ae944 (patch)
tree66cc35f00c71e60a2e0ba5428f0fd164faf0b684 /src/mhd
parent4e1770898a1de84dcfb4231ca89b1983f12e6c6a (diff)
downloadexchange-15ed6ffb07e2c1b87f08a1b168e76c743a2ae944.tar.gz
exchange-15ed6ffb07e2c1b87f08a1b168e76c743a2ae944.tar.bz2
exchange-15ed6ffb07e2c1b87f08a1b168e76c743a2ae944.zip
fix minor leak
Diffstat (limited to 'src/mhd')
-rw-r--r--src/mhd/mhd_config.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mhd/mhd_config.c b/src/mhd/mhd_config.c
index e2471e9b5..a619bba11 100644
--- a/src/mhd/mhd_config.c
+++ b/src/mhd/mhd_config.c
@@ -124,6 +124,7 @@ TALER_MHD_parse_config (const struct GNUNET_CONFIGURATION_Handle *cfg,
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"unixpath `%s' is too long\n",
*unix_path);
+ GNUNET_free (*unix_path);
return GNUNET_SYSERR;
}
@@ -136,6 +137,7 @@ TALER_MHD_parse_config (const struct GNUNET_CONFIGURATION_Handle *cfg,
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
section,
"UNIXPATH_MODE");
+ GNUNET_free (*unix_path);
return GNUNET_SYSERR;
}
errno = 0;
@@ -147,6 +149,7 @@ TALER_MHD_parse_config (const struct GNUNET_CONFIGURATION_Handle *cfg,
"UNIXPATH_MODE",
"must be octal number");
GNUNET_free (modestring);
+ GNUNET_free (*unix_path);
return GNUNET_SYSERR;
}
GNUNET_free (modestring);
@@ -332,8 +335,14 @@ TALER_MHD_bind (const struct GNUNET_CONFIGURATION_Handle *cfg,
&unixpath_mode))
return -1;
if (NULL != serve_unixpath)
- return TALER_MHD_open_unix_path (serve_unixpath,
- unixpath_mode);
+ {
+ int ret;
+
+ ret = TALER_MHD_open_unix_path (serve_unixpath,
+ unixpath_mode);
+ GNUNET_free (serve_unixpath);
+ return ret;
+ }
}
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,