gnunet_service_datastore_SOURCES = \
gnunet-service-datastore.c plugin_datastore.h
gnunet_service_datastore_LDADD = \
- $(top_builddir)/src/arm/libgnunetarm.la \
$(top_builddir)/src/statistics/libgnunetstatistics.la \
$(top_builddir)/src/util/libgnunetutil.la \
$(GN_LIBINTL)
#include "platform.h"
#include "gnunet_util_lib.h"
-#include "gnunet_arm_service.h"
#include "gnunet_protocols.h"
#include "gnunet_statistics_service.h"
#include "plugin_datastore.h"
GNUNET_CONTAINER_bloomfilter_free (filter);
filter = NULL;
}
- GNUNET_ARM_stop_services (cfg, tc->sched, "statistics", NULL);
if (stats != NULL)
{
GNUNET_STATISTICS_destroy (stats, GNUNET_YES);
}
return;
}
- GNUNET_ARM_start_services (cfg, sched, "statistics", NULL);
plugin = load_plugin ();
if (NULL == plugin)
{
GNUNET_CONTAINER_bloomfilter_free (filter);
filter = NULL;
- GNUNET_ARM_stop_services (cfg, sched, "statistics", NULL);
if (stats != NULL)
{
GNUNET_STATISTICS_destroy (stats, GNUNET_YES);
ret->data.file.reader_cls = GNUNET_FS_make_file_reader_context_ (ret->filename);
break;
case 4: /* directory */
+ ret->is_directory = GNUNET_YES;
if ( (GNUNET_OK !=
GNUNET_BIO_read_int32 (rh, &dsize)) ||
(NULL == (ret->data.dir.dir_data = GNUNET_malloc_large (dsize))) ||
goto cleanup;
}
ret->data.dir.dir_size = (uint32_t) dsize;
- ret->is_directory = GNUNET_YES;
if (filename != NULL)
{
ret->data.dir.entries = deserialize_file_information (h, filename);
pc->fi_pos = pc->fi;
}
}
+ GNUNET_free (fi_root);
+ fi_root = NULL;
/* generate RESUME event(s) */
GNUNET_FS_file_information_inspect (pc->fi,
&fip_signal_resume,
/* we were aborted in the meantime,
finish shutdown! */
publish_cleanup (pcc->sc);
+ GNUNET_free (pcc);
return;
}
GNUNET_assert (GNUNET_YES == pcc->sc->in_network_wait);
memcpy (dest, update, nidlen);
dest += nidlen;
memcpy (dest, uris, slen);
+ GNUNET_free (uris);
dest += slen;
mdsize = GNUNET_CONTAINER_meta_data_serialize (mmeta,
&dest,
if (mdsize == -1)
{
GNUNET_break (0);
- GNUNET_free (uris);
GNUNET_free (sb);
cont (cont_cls,
NULL,
sc->options,
NULL,
sr);
+ GNUNET_free (uu.data.sks.identifier);
}
GNUNET_free_non_null (sc->requests);
GNUNET_free_non_null (sc->emsg);
GNUNET_FS_uri_destroy (sc->uri);
+ GNUNET_free_non_null (sc->serialization);
GNUNET_free (sc);
}
? GNUNET_FS_SYNC_PATH_CHILD_SEARCH
: GNUNET_FS_SYNC_PATH_MASTER_SEARCH,
sc->serialization);
+ GNUNET_free (sc->serialization);
}
pi.status = GNUNET_FS_STATUS_SEARCH_STOPPED;
sc->client_info = GNUNET_FS_search_make_status_ (&pi, sc);
"nohelp", options, &run, NULL);
stop_arm (&p1);
GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-publish/");
- GNUNET_DISK_directory_remove (fn1);
- GNUNET_free_non_null (fn1);
- GNUNET_DISK_directory_remove (fn2);
- GNUNET_free_non_null (fn2);
+ if (fn1 != NULL)
+ {
+ GNUNET_DISK_directory_remove (fn1);
+ GNUNET_free (fn1);
+ }
+ if (fn2 != NULL)
+ {
+ GNUNET_DISK_directory_remove (fn2);
+ GNUNET_free (fn2);
+ }
return err;
}
"nohelp", options, &run, NULL);
stop_arm (&p1);
GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-unindex/");
- GNUNET_DISK_directory_remove (fn);
- GNUNET_free_non_null (fn);
+ if (NULL != fn)
+ {
+ GNUNET_DISK_directory_remove (fn);
+ GNUNET_free (fn);
+ }
return 0;
}
"nohelp", options, &run, NULL);
stop_arm (&p1);
GNUNET_DISK_directory_remove ("/tmp/gnunet-test-fs-unindex/");
- GNUNET_DISK_directory_remove (fn);
- GNUNET_free_non_null (fn);
+ if (NULL != fn)
+ {
+ GNUNET_DISK_directory_remove (fn);
+ GNUNET_free (fn);
+ }
return 0;
}
h->action_tail = NULL;
}
}
+ h->do_destroy = GNUNET_YES;
if ( (h->current != NULL) &&
(h->th == NULL) )
{
&transmit_action, h);
GNUNET_assert (NULL != h->th);
}
- h->do_destroy = GNUNET_YES;
- return;
+ if (h->th != NULL)
+ return;
}
if (NULL != h->th)
{
notify (sock->nth.notify_ready_cls, 0, NULL);
}
- if ((sock->sock != NULL) && (sock->persist != GNUNET_YES))
- GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (sock->sock));
-
+ if (sock->sock != NULL)
+ {
+ if (sock->persist != GNUNET_YES)
+ GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (sock->sock));
+ else
+ GNUNET_free (sock->sock); /* at least no memory leak (we deliberately
+ leak the socket in this special case) ... */
+ }
GNUNET_free_non_null (sock->addr);
GNUNET_free_non_null (sock->hostname);
#if DEBUG_CONNECTION