[Openvas-commits] r5450 - in trunk/openvas-client: . openvas

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Oct 9 09:46:39 CEST 2009


Author: jan
Date: 2009-10-09 09:46:38 +0200 (Fri, 09 Oct 2009)
New Revision: 5450

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/openvas/comm.c
   trunk/openvas-client/openvas/context.c
   trunk/openvas-client/openvas/openvas_plugin.c
   trunk/openvas-client/openvas/openvas_plugin.h
Log:
* openvas/openvas_plugin.c (openvas_plugin_free): Removed. It was
an empty function anyway and the whole openvas_plugin structure
needs to be resolved based on nvti_t anyway.

* openvas/openvas_plugin.h: Removed proto accordingly.

* openvas/comm.c (remove_outdated_plugins),
openvas/context.c (context_reset_plugins): Deactivated call of openvas_plugin_free.



Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2009-10-09 07:24:43 UTC (rev 5449)
+++ trunk/openvas-client/ChangeLog	2009-10-09 07:46:38 UTC (rev 5450)
@@ -1,5 +1,16 @@
 2009-10-09  Jan-Oliver Wagner <jan-oliver.wagner at greenbone.net>
 
+	* openvas/openvas_plugin.c (openvas_plugin_free): Removed. It was
+	an empty function anyway and the whole openvas_plugin structure
+	needs to be resolved based on nvti_t anyway.
+
+	* openvas/openvas_plugin.h: Removed proto accordingly.
+
+	* openvas/comm.c (remove_outdated_plugins),
+	openvas/context.c (context_reset_plugins): Deactivated call of openvas_plugin_free.
+
+2009-10-09  Jan-Oliver Wagner <jan-oliver.wagner at greenbone.net>
+
 	* openvasclient-mkcert.in: Changed Paris to Berlin for the default.
 
 2009-10-09  Jan-Oliver Wagner <jan-oliver.wagner at greenbone.net>

Modified: trunk/openvas-client/openvas/comm.c
===================================================================
--- trunk/openvas-client/openvas/comm.c	2009-10-09 07:24:43 UTC (rev 5449)
+++ trunk/openvas-client/openvas/comm.c	2009-10-09 07:46:38 UTC (rev 5450)
@@ -1713,7 +1713,7 @@
       /** @todo Examine if there isnt a memory leak. Eventually the "next"
        * pointer has to be modified (plugin->next = NULL) for the list not to
        * be freed completely. */
-      openvas_plugin_free (plugin);
+      // openvas_plugin_free (plugin);
     }
     else
     {

Modified: trunk/openvas-client/openvas/context.c
===================================================================
--- trunk/openvas-client/openvas/context.c	2009-10-09 07:24:43 UTC (rev 5449)
+++ trunk/openvas-client/openvas/context.c	2009-10-09 07:46:38 UTC (rev 5450)
@@ -160,8 +160,8 @@
 void
 context_reset_plugins (struct context *context)
 {
-  openvas_plugin_free (context->plugins);
-  openvas_plugin_free (context->scanners);
+//  openvas_plugin_free (context->plugins);
+//  openvas_plugin_free (context->scanners);
   context->plugins = NULL;
   context->scanners = NULL;
   efree (&context->plugins_md5sum);

Modified: trunk/openvas-client/openvas/openvas_plugin.c
===================================================================
--- trunk/openvas-client/openvas/openvas_plugin.c	2009-10-09 07:24:43 UTC (rev 5449)
+++ trunk/openvas-client/openvas/openvas_plugin.c	2009-10-09 07:46:38 UTC (rev 5450)
@@ -201,50 +201,3 @@
     }
   return copy;
 }
-
-
-void
-openvas_plugin_free (struct openvas_plugin * plugins)
-{
- /** @todo TBD.
-  * Two problems arise:
-  - cached and interned strings
-  - certain places (e.g. comm.c remove_outdated_plugins) want to free a single
-    plugin only, not the list. The respective code has been changed for now.
-
-  struct openvas_plugin * walk = plugins;
-  while (walk)
-    {
-      free (&(walk->oid));
-      free (walk->name);
-      free (walk->md5sum);
-      free (walk->category);
-      free (walk->copyright);
-      free (walk->description);
-      free (walk->summary);
-      free (walk->family);
-      free (walk->version);
-      free (walk->cve);
-      free (walk->bid);
-      free (walk->xrefs);
-      free (walk->script_tags);
-      free (walk->sign_key_ids);
-      arg_free_all (walk->plugin_prefs);
-      walk = walk->next;
-      // free (walk)
-    }
-  free (plugins);*/
-
-  /** @todo Following code would at least free the struct (contained data might
-            still be cached):
-
-  struct openvas_plugin * walk = plugins;
-  struct openvas_plugin * lost_memory = plugins;
-  while (walk)
-    {
-      lost_memory = walk;
-      walk = lost_memory->next;
-      free (lost_memory);
-    }
-  */
-}

Modified: trunk/openvas-client/openvas/openvas_plugin.h
===================================================================
--- trunk/openvas-client/openvas/openvas_plugin.h	2009-10-09 07:24:43 UTC (rev 5449)
+++ trunk/openvas-client/openvas/openvas_plugin.h	2009-10-09 07:46:38 UTC (rev 5450)
@@ -63,8 +63,6 @@
 
 struct openvas_plugin* openvas_plugin_duplicate(struct openvas_plugin *);
 
-void openvas_plugin_free(struct openvas_plugin * plugins);
-
 char * openvas_plugin_get_description(struct openvas_plugin * plugin);
 
 #endif /* _OPENVAS_OPENVAS_PLUGIN */



More information about the Openvas-commits mailing list