gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r6890 - GNUnet/src/applications/stats


From: gnunet
Subject: [GNUnet-SVN] r6890 - GNUnet/src/applications/stats
Date: Mon, 26 May 2008 14:08:39 -0600 (MDT)

Author: amatus
Date: 2008-05-26 14:08:38 -0600 (Mon, 26 May 2008)
New Revision: 6890

Modified:
   GNUnet/src/applications/stats/statistics.c
Log:
Variable statCounters was accessed outside of lock.


Modified: GNUnet/src/applications/stats/statistics.c
===================================================================
--- GNUnet/src/applications/stats/statistics.c  2008-05-26 19:32:00 UTC (rev 
6889)
+++ GNUnet/src/applications/stats/statistics.c  2008-05-26 20:08:38 UTC (rev 
6890)
@@ -98,11 +98,12 @@
         return i;
       }
   GNUNET_array_grow (entries, statCounters, statCounters + 1);
-  entries[statCounters - 1].description = GNUNET_strdup (name);
-  entries[statCounters - 1].descStrLen = strlen (name);
-  entries[statCounters - 1].value = 0;
+  i = statCounters - 1;
+  entries[i].description = GNUNET_strdup (name);
+  entries[i].descStrLen = strlen (name);
+  entries[i].value = 0;
   GNUNET_mutex_unlock (statLock);
-  return statCounters - 1;
+  return i;
 }
 
 /**





reply via email to

[Prev in Thread] Current Thread [Next in Thread]