[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: fix memory leak
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: fix memory leak |
Date: |
Mon, 25 Jun 2018 20:13:00 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 9be428429 fix memory leak
9be428429 is described below
commit 9be428429d2b3a11423df18d3e2d27f24bbe4458
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Jun 25 20:12:58 2018 +0200
fix memory leak
---
src/util/gnunet-config.c | 27 ++++++++++++++++++---------
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c
index 16b826ee2..532a5a0d6 100644
--- a/src/util/gnunet-config.c
+++ b/src/util/gnunet-config.c
@@ -75,20 +75,29 @@ print_option (void *cls,
const char *option,
const char *value)
{
- (void) section;
const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
- char *value_fn;
+
+ (void) section;
if (is_filename)
{
+ char *value_fn;
+ char *fn;
+
GNUNET_assert (GNUNET_OK ==
- GNUNET_CONFIGURATION_get_value_filename (cfg,
- section,
- option,
- &value_fn));
+ GNUNET_CONFIGURATION_get_value_filename (cfg,
+ section,
+ option,
+ &value_fn));
+ fn = GNUNET_STRINGS_filename_expand (value_fn);
+ if (NULL == fn)
+ fn = value_fn;
+ else
+ GNUNET_free (value_fn);
fprintf (stdout,
- "%s = %s\n",
- option,
- GNUNET_STRINGS_filename_expand (value_fn));
+ "%s = %s\n",
+ option,
+ fn);
+ GNUNET_free (fn);
}
else
{
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated: fix memory leak,
gnunet <=