aboutsummaryrefslogtreecommitdiff
path: root/src/datacache
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-11-09 20:47:23 +0000
committerChristian Grothoff <christian@grothoff.org>2013-11-09 20:47:23 +0000
commitfc32a4b28542a48bbe357dd910ff10cfb2d2c722 (patch)
tree111829b11f67608216dd6fbf91aa375cacd27cae /src/datacache
parent67d4a36d23f6053cc6a34eb9270aaa14ecae2ca2 (diff)
downloadgnunet-fc32a4b28542a48bbe357dd910ff10cfb2d2c722.tar.gz
gnunet-fc32a4b28542a48bbe357dd910ff10cfb2d2c722.zip
-doxygen, memory leak in heap plugin on shutdown
Diffstat (limited to 'src/datacache')
-rw-r--r--src/datacache/datacache.c4
-rw-r--r--src/datacache/plugin_datacache_heap.c13
2 files changed, 9 insertions, 8 deletions
diff --git a/src/datacache/datacache.c b/src/datacache/datacache.c
index e6b49fd75..c96432946 100644
--- a/src/datacache/datacache.c
+++ b/src/datacache/datacache.c
@@ -233,9 +233,9 @@ GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h)
233 * @param data data to store 233 * @param data data to store
234 * @param type type of the value 234 * @param type type of the value
235 * @param discard_time when to discard the value in any case 235 * @param discard_time when to discard the value in any case
236 * @param path_info_len number of entries in 'path_info' 236 * @param path_info_len number of entries in @a path_info
237 * @param path_info a path through the network 237 * @param path_info a path through the network
238 * @return GNUNET_OK on success, GNUNET_SYSERR on error, GNUNET_NO if duplicate 238 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error, #GNUNET_NO if duplicate
239 */ 239 */
240int 240int
241GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h, 241GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
diff --git a/src/datacache/plugin_datacache_heap.c b/src/datacache/plugin_datacache_heap.c
index e930705f2..85cf9487e 100644
--- a/src/datacache/plugin_datacache_heap.c
+++ b/src/datacache/plugin_datacache_heap.c
@@ -156,7 +156,7 @@ struct PutContext
156 * @param cls the 'struct PutContext' 156 * @param cls the 'struct PutContext'
157 * @param key the key for the value(s) 157 * @param key the key for the value(s)
158 * @param value an existing value 158 * @param value an existing value
159 * @return GNUNET_YES if not found (to continue to iterate) 159 * @return #GNUNET_YES if not found (to continue to iterate)
160 */ 160 */
161static int 161static int
162put_cb (void *cls, 162put_cb (void *cls,
@@ -198,13 +198,13 @@ put_cb (void *cls,
198/** 198/**
199 * Store an item in the datastore. 199 * Store an item in the datastore.
200 * 200 *
201 * @param cls closure (our "struct Plugin") 201 * @param cls closure (our `struct Plugin`)
202 * @param key key to store data under 202 * @param key key to store data under
203 * @param size number of bytes in data 203 * @param size number of bytes in data
204 * @param data data to store 204 * @param data data to store
205 * @param type type of the value 205 * @param type type of the value
206 * @param discard_time when to discard the value in any case 206 * @param discard_time when to discard the value in any case
207 * @param path_info_len number of entries in 'path_info' 207 * @param path_info_len number of entries in @a path_info
208 * @param path_info a path through the network 208 * @param path_info a path through the network
209 * @return 0 if duplicate, -1 on error, number of bytes used otherwise 209 * @return 0 if duplicate, -1 on error, number of bytes used otherwise
210 */ 210 */
@@ -356,7 +356,7 @@ heap_plugin_get (void *cls, const struct GNUNET_HashCode * key,
356 * from the datacache right now. 356 * from the datacache right now.
357 * 357 *
358 * @param cls closure (our "struct Plugin") 358 * @param cls closure (our "struct Plugin")
359 * @return GNUNET_OK on success, GNUNET_SYSERR on error 359 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
360 */ 360 */
361static int 361static int
362heap_plugin_del (void *cls) 362heap_plugin_del (void *cls)
@@ -383,8 +383,8 @@ heap_plugin_del (void *cls)
383/** 383/**
384 * Entry point for the plugin. 384 * Entry point for the plugin.
385 * 385 *
386 * @param cls closure (the "struct GNUNET_DATACACHE_PluginEnvironmnet") 386 * @param cls closure (the `struct GNUNET_DATACACHE_PluginEnvironmnet`)
387 * @return the plugin's closure (our "struct Plugin") 387 * @return the plugin's closure (our `struct Plugin`)
388 */ 388 */
389void * 389void *
390libgnunet_plugin_datacache_heap_init (void *cls) 390libgnunet_plugin_datacache_heap_init (void *cls)
@@ -427,6 +427,7 @@ libgnunet_plugin_datacache_heap_done (void *cls)
427 GNUNET_CONTAINER_multihashmap_remove (plugin->map, 427 GNUNET_CONTAINER_multihashmap_remove (plugin->map,
428 &val->key, 428 &val->key,
429 val)); 429 val));
430 GNUNET_free_non_null (val->path_info);
430 GNUNET_free (val); 431 GNUNET_free (val);
431 } 432 }
432 GNUNET_CONTAINER_heap_destroy (plugin->heap); 433 GNUNET_CONTAINER_heap_destroy (plugin->heap);