aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-27 14:34:57 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-27 14:34:57 +0200
commitb1feb05aa88177b49fd1e0a8905257416fda41f3 (patch)
tree6a6b8fe26e060ecf552803071430653db539836c
parent7a978b060ddb9ec547044325b3029daeb33d0cbf (diff)
downloadgnunet-b1feb05aa88177b49fd1e0a8905257416fda41f3.tar.gz
gnunet-b1feb05aa88177b49fd1e0a8905257416fda41f3.zip
-fix minor memory leak
-rw-r--r--src/util/configuration.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/util/configuration.c b/src/util/configuration.c
index 1aa52ad76..62c06ae23 100644
--- a/src/util/configuration.c
+++ b/src/util/configuration.c
@@ -2350,7 +2350,6 @@ GNUNET_CONFIGURATION_default_filename (void)
2350 2350
2351 if (GNUNET_OK == GNUNET_DISK_file_test_read (cfg_fn)) 2351 if (GNUNET_OK == GNUNET_DISK_file_test_read (cfg_fn))
2352 return cfg_fn; 2352 return cfg_fn;
2353
2354 GNUNET_free (cfg_fn); 2353 GNUNET_free (cfg_fn);
2355 2354
2356 /* Fall back to /etc/ for the default configuration. 2355 /* Fall back to /etc/ for the default configuration.
@@ -2359,24 +2358,21 @@ GNUNET_CONFIGURATION_default_filename (void)
2359 GNUNET_asprintf (&cfg_fn, 2358 GNUNET_asprintf (&cfg_fn,
2360 "/etc/%s", 2359 "/etc/%s",
2361 pd->config_file); 2360 pd->config_file);
2362
2363 if (GNUNET_OK == GNUNET_DISK_file_test_read (cfg_fn)) 2361 if (GNUNET_OK == GNUNET_DISK_file_test_read (cfg_fn))
2364 return cfg_fn; 2362 return cfg_fn;
2365
2366 GNUNET_free (cfg_fn); 2363 GNUNET_free (cfg_fn);
2367 2364
2368 GNUNET_asprintf (&cfg_fn, 2365 GNUNET_asprintf (&cfg_fn,
2369 "/etc/%s", 2366 "/etc/%s",
2370 pd->config_file); 2367 pd->config_file);
2371
2372 if (GNUNET_OK == GNUNET_DISK_file_test_read (cfg_fn)) 2368 if (GNUNET_OK == GNUNET_DISK_file_test_read (cfg_fn))
2373 return cfg_fn; 2369 return cfg_fn;
2370 GNUNET_free (cfg_fn);
2374 2371
2375 GNUNET_asprintf (&cfg_fn, 2372 GNUNET_asprintf (&cfg_fn,
2376 "/etc/%s/%s", 2373 "/etc/%s/%s",
2377 pd->project_dirname, 2374 pd->project_dirname,
2378 pd->config_file); 2375 pd->config_file);
2379
2380 if (GNUNET_OK == GNUNET_DISK_file_test_read (cfg_fn)) 2376 if (GNUNET_OK == GNUNET_DISK_file_test_read (cfg_fn))
2381 return cfg_fn; 2377 return cfg_fn;
2382 2378