diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2021-03-29 23:52:28 +0200 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2021-03-29 23:52:28 +0200 |
commit | d8b32bc60d26a8a30b71530af0bd3e9e037e073b (patch) | |
tree | e62d5396fdf79faec5c97e55a75ee0ec4fe8fc3b /src/messenger/messenger_api_contact_store.c | |
parent | 29be7985d06482beec4304b0f2eb57f23b6ec84d (diff) | |
download | gnunet-d8b32bc60d26a8a30b71530af0bd3e9e037e073b.tar.gz gnunet-d8b32bc60d26a8a30b71530af0bd3e9e037e073b.zip |
-fixed multiple leaks in messenger
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src/messenger/messenger_api_contact_store.c')
-rwxr-xr-x[-rw-r--r--] | src/messenger/messenger_api_contact_store.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/messenger/messenger_api_contact_store.c b/src/messenger/messenger_api_contact_store.c index 5238b2c58..6a517c2e0 100644..100755 --- a/src/messenger/messenger_api_contact_store.c +++ b/src/messenger/messenger_api_contact_store.c | |||
@@ -155,8 +155,10 @@ update_store_contact (struct GNUNET_MESSENGER_ContactStore *store, struct GNUNET | |||
155 | store, next_context, &hash | 155 | store, next_context, &hash |
156 | ); | 156 | ); |
157 | 157 | ||
158 | GNUNET_CONTAINER_multihashmap_put (map, &hash, contact, | 158 | if (GNUNET_OK != GNUNET_CONTAINER_multihashmap_put (map, &hash, contact, |
159 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); | 159 | GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)) |
160 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Updating a contact failed: %s\n", | ||
161 | GNUNET_h2s(&hash)); | ||
160 | } | 162 | } |
161 | } | 163 | } |
162 | 164 | ||
@@ -176,7 +178,8 @@ remove_store_contact (struct GNUNET_MESSENGER_ContactStore *store, struct GNUNET | |||
176 | ); | 178 | ); |
177 | 179 | ||
178 | if (GNUNET_YES != GNUNET_CONTAINER_multihashmap_remove (map, &hash, contact)) | 180 | if (GNUNET_YES != GNUNET_CONTAINER_multihashmap_remove (map, &hash, contact)) |
179 | return; | 181 | GNUNET_log(GNUNET_ERROR_TYPE_WARNING, "Removing a contact failed: %s\n", |
182 | GNUNET_h2s(&hash)); | ||
180 | 183 | ||
181 | destroy_contact (contact); | 184 | destroy_contact (contact); |
182 | } | 185 | } |