[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r11147 - gnunet/src/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r11147 - gnunet/src/fs |
Date: |
Sat, 1 May 2010 14:17:38 +0200 |
Author: grothoff
Date: 2010-05-01 14:17:38 +0200 (Sat, 01 May 2010)
New Revision: 11147
Modified:
gnunet/src/fs/fs.c
gnunet/src/fs/fs_directory.c
gnunet/src/fs/fs_download.c
gnunet/src/fs/fs_file_information.c
Log:
fixing double free, missing free, use of undef key
Modified: gnunet/src/fs/fs.c
===================================================================
--- gnunet/src/fs/fs.c 2010-05-01 12:17:19 UTC (rev 11146)
+++ gnunet/src/fs/fs.c 2010-05-01 12:17:38 UTC (rev 11147)
@@ -663,6 +663,8 @@
GNUNET_free (filename);
filename = NULL;
}
+ GNUNET_free_non_null (ksks);
+ GNUNET_free_non_null (chks);
return ret;
cleanup:
GNUNET_free_non_null (ksks);
@@ -1077,6 +1079,7 @@
pc->fi_pos = find_file_position (pc->fi,
fi_pos);
GNUNET_free (fi_pos);
+ fi_pos = NULL;
if (pc->fi_pos == NULL)
{
/* failed to find position for resuming, outch! Will start from root!
*/
@@ -1106,11 +1109,13 @@
emsg);
GNUNET_free (emsg);
}
+ GNUNET_free_non_null (ns);
return GNUNET_OK;
cleanup:
GNUNET_free_non_null (pc->nid);
GNUNET_free_non_null (pc->nuid);
GNUNET_free_non_null (fi_root);
+ GNUNET_free_non_null (fi_pos);
GNUNET_free_non_null (ns);
if ( (rh != NULL) &&
(GNUNET_OK !=
Modified: gnunet/src/fs/fs_directory.c
===================================================================
--- gnunet/src/fs/fs_directory.c 2010-05-01 12:17:19 UTC (rev 11146)
+++ gnunet/src/fs/fs_directory.c 2010-05-01 12:17:38 UTC (rev 11147)
@@ -627,6 +627,9 @@
"malloc");
*rsize = 0;
*rdata = NULL;
+ GNUNET_free_non_null (sizes);
+ GNUNET_free_non_null (perm);
+ GNUNET_free_non_null (bes);
return GNUNET_SYSERR;
}
*rdata = data;
Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2010-05-01 12:17:19 UTC (rev 11146)
+++ gnunet/src/fs/fs_download.c 2010-05-01 12:17:38 UTC (rev 11147)
@@ -313,6 +313,7 @@
block,
len)) )
{
+ GNUNET_CRYPTO_hash (block, len, &key);
if (0 == memcmp (&key,
&chk->key,
sizeof (GNUNET_HashCode)))
Modified: gnunet/src/fs/fs_file_information.c
===================================================================
--- gnunet/src/fs/fs_file_information.c 2010-05-01 12:17:19 UTC (rev 11146)
+++ gnunet/src/fs/fs_file_information.c 2010-05-01 12:17:38 UTC (rev 11147)
@@ -741,7 +741,6 @@
&fi->client_info);
}
GNUNET_free_non_null (fi->filename);
- GNUNET_free_non_null (fi->serialization);
GNUNET_free_non_null (fi->emsg);
GNUNET_free_non_null (fi->chk_uri);
/* clean up serialization */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r11147 - gnunet/src/fs,
gnunet <=