From 4063a80951c4c42a49f3811b81b3b642634dcd31 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 29 Jun 2012 13:54:00 +0000 Subject: -fixes --- src/util/common_logging.c | 3 ++- src/util/gnunet-uri.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/util') diff --git a/src/util/common_logging.c b/src/util/common_logging.c index 8ba955dea..873420460 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c @@ -922,7 +922,8 @@ mylog (enum GNUNET_ErrorType kind, const char *comp, const char *message, } #endif VSNPRINTF (buf, size, message, va); - (void) setup_log_file (tmptr); + if (NULL != tmptr) + (void) setup_log_file (tmptr); if ((0 != (kind & GNUNET_ERROR_TYPE_BULK)) && (last_bulk_time.abs_value != 0) && (0 == strncmp (buf, last_bulk, sizeof (last_bulk)))) diff --git a/src/util/gnunet-uri.c b/src/util/gnunet-uri.c index 68e7fa04b..6268360f2 100644 --- a/src/util/gnunet-uri.c +++ b/src/util/gnunet-uri.c @@ -62,7 +62,7 @@ maint_child_death (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) (0 == code) ) ret = 0; else - GNUNET_OS_process_kill (p, SIGTERM); + GNUNET_break (0 == GNUNET_OS_process_kill (p, SIGTERM)); GNUNET_OS_process_destroy (p); } @@ -110,8 +110,10 @@ run (void *cls, char *const *args, const char *cfgfile, &program)) { fprintf (stderr, _("No handler known for subsystem `%s'\n"), subsystem); + GNUNET_free (subsystem); return; } + GNUNET_free (subsystem); rt = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_DISK_pipe_handle (sigpipe, GNUNET_DISK_PIPE_END_READ), @@ -122,6 +124,7 @@ run (void *cls, char *const *args, const char *cfgfile, program, args[0], NULL); + GNUNET_free (program); if (NULL == p) GNUNET_SCHEDULER_cancel (rt); } -- cgit v1.2.3