[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r22386 - in gnunet/src: dns fs util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r22386 - in gnunet/src: dns fs util |
Date: |
Fri, 29 Jun 2012 15:54:00 +0200 |
Author: grothoff
Date: 2012-06-29 15:54:00 +0200 (Fri, 29 Jun 2012)
New Revision: 22386
Modified:
gnunet/src/dns/dnsparser.c
gnunet/src/fs/gnunet-auto-share.c
gnunet/src/util/common_logging.c
gnunet/src/util/gnunet-uri.c
Log:
-fixes
Modified: gnunet/src/dns/dnsparser.c
===================================================================
--- gnunet/src/dns/dnsparser.c 2012-06-29 13:51:20 UTC (rev 22385)
+++ gnunet/src/dns/dnsparser.c 2012-06-29 13:54:00 UTC (rev 22386)
@@ -266,10 +266,11 @@
"_$SERVICE._$PROTO.$DOMAIN_NAME" */
ndup = GNUNET_strdup (r->name);
tok = strtok (ndup, ".");
+ GNUNET_assert (NULL != tok);
GNUNET_assert ('_' == *tok);
r->data.srv->service = GNUNET_strdup (&tok[1]);
tok = strtok (NULL, ".");
- if ('_' != *tok)
+ if ( (NULL == tok) || ('_' != *tok) )
{
GNUNET_free (r->data.srv);
GNUNET_free (ndup);
Modified: gnunet/src/fs/gnunet-auto-share.c
===================================================================
--- gnunet/src/fs/gnunet-auto-share.c 2012-06-29 13:51:20 UTC (rev 22385)
+++ gnunet/src/fs/gnunet-auto-share.c 2012-06-29 13:54:00 UTC (rev 22386)
@@ -283,6 +283,14 @@
n = GNUNET_CONTAINER_multihashmap_size (work_finished);
fn = get_state_file ();
wh = GNUNET_BIO_write_open (fn);
+ if (NULL == wh)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ _("Failed to save state to file %s\n"),
+ fn);
+ GNUNET_free (fn);
+ return;
+ }
if (GNUNET_OK !=
GNUNET_BIO_write_int32 (wh, n))
{
Modified: gnunet/src/util/common_logging.c
===================================================================
--- gnunet/src/util/common_logging.c 2012-06-29 13:51:20 UTC (rev 22385)
+++ gnunet/src/util/common_logging.c 2012-06-29 13:54:00 UTC (rev 22386)
@@ -922,7 +922,8 @@
}
#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))))
Modified: gnunet/src/util/gnunet-uri.c
===================================================================
--- gnunet/src/util/gnunet-uri.c 2012-06-29 13:51:20 UTC (rev 22385)
+++ gnunet/src/util/gnunet-uri.c 2012-06-29 13:54:00 UTC (rev 22386)
@@ -62,7 +62,7 @@
(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 @@
&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 @@
program,
args[0],
NULL);
+ GNUNET_free (program);
if (NULL == p)
GNUNET_SCHEDULER_cancel (rt);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r22386 - in gnunet/src: dns fs util,
gnunet <=