[Openvas-commits] r3277 - in trunk/openvas-manager: . src

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri May 8 15:05:47 CEST 2009


Author: mattm
Date: 2009-05-08 15:05:44 +0200 (Fri, 08 May 2009)
New Revision: 3277

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/manage.c
Log:
	* src/manage.c (start_task): Free task_plugins string after use.


Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2009-05-08 12:57:52 UTC (rev 3276)
+++ trunk/openvas-manager/ChangeLog	2009-05-08 13:05:44 UTC (rev 3277)
@@ -1,5 +1,9 @@
 2009-05-08  Matthew Mundell <matt at mundell.ukfsn.org>
 
+	* src/manage.c (start_task): Free task_plugins string after use.
+
+2009-05-08  Matthew Mundell <matt at mundell.ukfsn.org>
+
 	* src/manage.c (task_plugins): New function.
 	(start_task): Request plugins listed in RC file instead of always
 	requesting all plugins.

Modified: trunk/openvas-manager/src/manage.c
===================================================================
--- trunk/openvas-manager/src/manage.c	2009-05-08 12:57:52 UTC (rev 3276)
+++ trunk/openvas-manager/src/manage.c	2009-05-08 13:05:44 UTC (rev 3277)
@@ -762,6 +762,7 @@
 start_task (task_t task)
 {
   char* targets;
+  char* plugins;
   int fail;
 
   tracef ("   start task %u\n", task_id (task));
@@ -786,7 +787,12 @@
   // FIX still getting FINISHED msgs
   if (send_to_server ("ntp_opt_show_end <|> no\n")) return -1;
   //if (send_to_server ("ntp_short_status <|> yes\n")) return -1;
-  if (sendf_to_server ("plugin_set <|> %s\n", task_plugins (task))) return -1;
+
+  plugins = task_plugins (task);
+  fail = sendf_to_server ("plugin_set <|> %s\n", plugins);
+  free (plugins);
+  if (fail) return -1;
+
   // FIX
   if (send_to_server ("port_range <|> 21\n")) return -1;
   if (send_to_server ("\n")) return -1;



More information about the Openvas-commits mailing list