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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Jun 10 13:12:11 CEST 2010


Author: mattm
Date: 2010-06-10 13:12:10 +0200 (Thu, 10 Jun 2010)
New Revision: 7994

Modified:
   trunk/openvas-manager/ChangeLog
   trunk/openvas-manager/src/omp.c
Log:
	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TASK free
	description if the initial check fails and cleanup properly in the
	escalator and schedule fail cases.

Modified: trunk/openvas-manager/ChangeLog
===================================================================
--- trunk/openvas-manager/ChangeLog	2010-06-10 11:02:43 UTC (rev 7993)
+++ trunk/openvas-manager/ChangeLog	2010-06-10 11:12:10 UTC (rev 7994)
@@ -1,5 +1,11 @@
 2010-06-09  Matthew Mundell <matthew.mundell at greenbone.net>
 
+	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TASK free
+	description if the initial check fails and cleanup properly in the
+	escalator and schedule fail cases.
+
+2010-06-09  Matthew Mundell <matthew.mundell at greenbone.net>
+
 	Add config UUIDs.
 
 	* src/manage_sql.c (user_owns): Remove.  Everything uses user_owns_uuid.

Modified: trunk/openvas-manager/src/omp.c
===================================================================
--- trunk/openvas-manager/src/omp.c	2010-06-10 11:02:43 UTC (rev 7993)
+++ trunk/openvas-manager/src/omp.c	2010-06-10 11:12:10 UTC (rev 7994)
@@ -9970,6 +9970,7 @@
             {
               request_delete_task (&create_task_data->task);
               free (tsk_uuid);
+              free (description);
               SEND_TO_CLIENT_OR_FAIL
                (XML_ERROR_SYNTAX ("create_task",
                                   "CREATE_TASK requires either an rcfile"
@@ -9990,6 +9991,9 @@
               escalator_t escalator;
               if (find_escalator (create_task_data->escalator_id, &escalator))
                 {
+                  request_delete_task (&create_task_data->task);
+                  free (tsk_uuid);
+                  free (description);
                   SEND_TO_CLIENT_OR_FAIL (XML_INTERNAL_ERROR ("create_task"));
                   create_task_data_reset (create_task_data);
                   set_client_state (CLIENT_AUTHENTIC);
@@ -9997,6 +10001,9 @@
                 }
               if (escalator == 0)
                 {
+                  request_delete_task (&create_task_data->task);
+                  free (tsk_uuid);
+                  free (description);
                   SEND_TO_CLIENT_OR_FAIL
                    (XML_ERROR_SYNTAX ("create_task",
                                       "CREATE_TASK escalator must exist"));
@@ -10014,6 +10021,9 @@
               schedule_t schedule;
               if (find_schedule (create_task_data->schedule_id, &schedule))
                 {
+                  request_delete_task (&create_task_data->task);
+                  free (tsk_uuid);
+                  free (description);
                   SEND_TO_CLIENT_OR_FAIL (XML_INTERNAL_ERROR ("create_task"));
                   create_task_data_reset (create_task_data);
                   set_client_state (CLIENT_AUTHENTIC);
@@ -10021,6 +10031,9 @@
                 }
               if (schedule == 0)
                 {
+                  request_delete_task (&create_task_data->task);
+                  free (tsk_uuid);
+                  free (description);
                   SEND_TO_CLIENT_OR_FAIL
                    (XML_ERROR_SYNTAX ("create_task",
                                       "CREATE_TASK schedule must exist"));



More information about the Openvas-commits mailing list