gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r9343 - gnunet/src/arm


From: gnunet
Subject: [GNUnet-SVN] r9343 - gnunet/src/arm
Date: Thu, 29 Oct 2009 17:23:41 -0600

Author: grothoff
Date: 2009-10-29 17:23:41 -0600 (Thu, 29 Oct 2009)
New Revision: 9343

Modified:
   gnunet/src/arm/arm_api.c
Log:
dup to prevent access after free:


Modified: gnunet/src/arm/arm_api.c
===================================================================
--- gnunet/src/arm/arm_api.c    2009-10-29 16:36:54 UTC (rev 9342)
+++ gnunet/src/arm/arm_api.c    2009-10-29 23:23:41 UTC (rev 9343)
@@ -54,7 +54,7 @@
   /**
    * The configuration that we are using.
    */
-  const struct GNUNET_CONFIGURATION_Handle *cfg;
+  struct GNUNET_CONFIGURATION_Handle *cfg;
 
   /**
    * Scheduler to use.
@@ -87,7 +87,7 @@
   if (client == NULL)
     return NULL;
   ret = GNUNET_malloc (sizeof (struct GNUNET_ARM_Handle));
-  ret->cfg = cfg;
+  ret->cfg = GNUNET_CONFIGURATION_dup (cfg);
   ret->sched = sched;
   ret->client = client;
   return ret;
@@ -104,6 +104,7 @@
 {
   if (h->client != NULL)
     GNUNET_CLIENT_disconnect (h->client);
+  GNUNET_CONFIGURATION_destroy (h->cfg);
   GNUNET_free (h);
 }
 





reply via email to

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