summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2021-08-08 17:03:15 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2021-08-08 17:03:15 +0200
commit8eaf6eafbf7f1bab5f40ade995161ee27a05a84f (patch)
treebe8fe0b9266b3a03c723179318ee990e3ece8e1d
parent615487401fd79c62ea42ad15ad3740995030ec5c (diff)
-various coverity fixes
-rw-r--r--src/messenger/gnunet-service-messenger_member.c1
-rw-r--r--src/messenger/gnunet-service-messenger_room.c1
-rw-r--r--src/rest/plugin_rest_config.c1
-rw-r--r--src/revocation/gnunet-service-revocation.c1
-rw-r--r--src/util/client.c2
-rw-r--r--src/util/configuration.c1
-rw-r--r--src/util/disk.c1
7 files changed, 8 insertions, 0 deletions
diff --git a/src/messenger/gnunet-service-messenger_member.c b/src/messenger/gnunet-service-messenger_member.c
index 7f00e8438..b0a735dbe 100644
--- a/src/messenger/gnunet-service-messenger_member.c
+++ b/src/messenger/gnunet-service-messenger_member.c
@@ -88,6 +88,7 @@ callback_scan_for_sessions (void *cls, const char *filename)
GNUNET_asprintf (&directory, "%s%c", filename, DIR_SEPARATOR);
load_member_session(member, directory);
+ GNUNET_free (directory);
}
return GNUNET_OK;
diff --git a/src/messenger/gnunet-service-messenger_room.c b/src/messenger/gnunet-service-messenger_room.c
index c3a5e3a4b..73e94908f 100644
--- a/src/messenger/gnunet-service-messenger_room.c
+++ b/src/messenger/gnunet-service-messenger_room.c
@@ -1144,6 +1144,7 @@ load_room (struct GNUNET_MESSENGER_SrvRoom *room)
GNUNET_asprintf (&last_messages_file, "%s%s", room_dir, "last_messages.list");
load_message_state(&(room->state), room_dir);
+ GNUNET_free (last_messages_file);
}
GNUNET_free(room_dir);
diff --git a/src/rest/plugin_rest_config.c b/src/rest/plugin_rest_config.c
index af833efff..8269a4662 100644
--- a/src/rest/plugin_rest_config.c
+++ b/src/rest/plugin_rest_config.c
@@ -334,6 +334,7 @@ set_cont (struct GNUNET_REST_RequestHandle *con_handle,
handle->proc (handle->proc_cls,
GNUNET_REST_create_response (NULL),
MHD_HTTP_OK);
+ GNUNET_free (cfg_fn);
cleanup_handle (handle);
}
diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c
index 2d8111adb..5fe0ade98 100644
--- a/src/revocation/gnunet-service-revocation.c
+++ b/src/revocation/gnunet-service-revocation.c
@@ -949,6 +949,7 @@ run (void *cls,
if (0 > ksize)
{
GNUNET_break_op (0);
+ GNUNET_free (rm);
GNUNET_free (fn);
return;
}
diff --git a/src/util/client.c b/src/util/client.c
index afd2fe900..febc36508 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -745,6 +745,8 @@ test_service_configuration (const char *service_name,
service_name,
"UNIXPATH",
_ ("not a valid filename"));
+ if (NULL != unixpath)
+ GNUNET_free (unixpath);
return GNUNET_SYSERR; /* UNIXPATH specified but invalid! */
}
GNUNET_free (unixpath);
diff --git a/src/util/configuration.c b/src/util/configuration.c
index dff3c2e99..1aa52ad76 100644
--- a/src/util/configuration.c
+++ b/src/util/configuration.c
@@ -1007,6 +1007,7 @@ GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg,
cf->source_filename,
parent->source_filename,
filename);
+ GNUNET_free (fn);
return GNUNET_SYSERR;
}
}
diff --git a/src/util/disk.c b/src/util/disk.c
index ada35249f..2efb52d46 100644
--- a/src/util/disk.c
+++ b/src/util/disk.c
@@ -1020,6 +1020,7 @@ GNUNET_DISK_glob (const char *glob_pattern,
LOG (GNUNET_ERROR_TYPE_ERROR,
"unsupported glob pattern: '%s'\n",
glob_pattern);
+ GNUNET_free (mypat);
return -1;
}