Author: bh
Date: 2007-07-24 17:22:42 +0200 (Tue, 24 Jul 2007)
New Revision: 305
Modified:
trunk/openvas-client/ChangeLog
trunk/openvas-client/nessus/cli.c
trunk/openvas-client/nessus/filter.c
trunk/openvas-client/nessus/nessus_plugin.c
trunk/openvas-client/nessus/pdf_output.c
trunk/openvas-client/nessus/xml_output_ng.c
Log:
* nessus/nessus_plugin.c (nessus_plugin_get_description): Return
the description directly without making a copy. Since the
description is now stored uncompressed it's not necessary anymore
to return a copy and there were several places in the code where
the returned string wasn't freed.
* nessus/xml_output_ng.c (xml_plugins_plugin),
nessus/pdf_output.c (print_plugin_information),
nessus/filter.c (filter_plugin),
nessus/cli.c (_cli_sql_dump_plugins): Adapt to
nessus_plugin_get_description changes.
Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog 2007-07-24 15:06:23 UTC (rev 304)
+++ trunk/openvas-client/ChangeLog 2007-07-24 15:22:42 UTC (rev 305)
@@ -1,5 +1,19 @@
2007-07-24 Bernhard Herzog <[EMAIL PROTECTED]>
+ * nessus/nessus_plugin.c (nessus_plugin_get_description): Return
+ the description directly without making a copy. Since the
+ description is now stored uncompressed it's not necessary anymore
+ to return a copy and there were several places in the code where
+ the returned string wasn't freed.
+
+ * nessus/xml_output_ng.c (xml_plugins_plugin),
+ nessus/pdf_output.c (print_plugin_information),
+ nessus/filter.c (filter_plugin),
+ nessus/cli.c (_cli_sql_dump_plugins): Adapt to
+ nessus_plugin_get_description changes.
+
+2007-07-24 Bernhard Herzog <[EMAIL PROTECTED]>
+
* nessus/nessus_plugin.c (nessus_plugin_new): Intern the summary,
too.
Modified: trunk/openvas-client/nessus/cli.c
===================================================================
--- trunk/openvas-client/nessus/cli.c 2007-07-24 15:06:23 UTC (rev 304)
+++ trunk/openvas-client/nessus/cli.c 2007-07-24 15:22:42 UTC (rev 305)
@@ -548,7 +548,6 @@
m = sql_addslashes(n);
printf("'%s',", m);
efree(&m);
- efree(&n);
m = sql_addslashes(p->version);
printf("'%s',", m);
@@ -631,7 +630,6 @@
var = addslashes(n);
printf("%s\n", var);
efree(&var);
- efree(&n);
p = p->next;
}
}
Modified: trunk/openvas-client/nessus/filter.c
===================================================================
--- trunk/openvas-client/nessus/filter.c 2007-07-24 15:06:23 UTC (rev
304)
+++ trunk/openvas-client/nessus/filter.c 2007-07-24 15:22:42 UTC (rev
305)
@@ -344,7 +344,7 @@
if(filter->filter_on_id)ret= match(id, filter->pattern);
retval = ret;
- efree(&description);
+
ret:
#endif
Modified: trunk/openvas-client/nessus/nessus_plugin.c
===================================================================
--- trunk/openvas-client/nessus/nessus_plugin.c 2007-07-24 15:06:23 UTC (rev
304)
+++ trunk/openvas-client/nessus/nessus_plugin.c 2007-07-24 15:22:42 UTC (rev
305)
@@ -91,7 +91,7 @@
char *
nessus_plugin_get_description(struct nessus_plugin * plugin)
{
- return estrdup(plugin->description);
+ return plugin->description;
}
/* Create a duplicate of the plugin */
Modified: trunk/openvas-client/nessus/pdf_output.c
===================================================================
--- trunk/openvas-client/nessus/pdf_output.c 2007-07-24 15:06:23 UTC (rev
304)
+++ trunk/openvas-client/nessus/pdf_output.c 2007-07-24 15:22:42 UTC (rev
305)
@@ -910,7 +910,6 @@
fputs("<p></p>\n<h4>Description</h4>\n", file);
fputs(html_description, file);
efree(&html_description);
- efree(&description);
fprintf(file, "\n<p>\n");
Modified: trunk/openvas-client/nessus/xml_output_ng.c
===================================================================
--- trunk/openvas-client/nessus/xml_output_ng.c 2007-07-24 15:06:23 UTC (rev
304)
+++ trunk/openvas-client/nessus/xml_output_ng.c 2007-07-24 15:22:42 UTC (rev
305)
@@ -401,7 +401,6 @@
xml_fprintf_element (fd, indent+1, "summary", u->summary);
xml_fprintf_element (fd, indent+1, "copyright", u->copyright);
xml_fprintf (fd, indent, "</plugin>\n");
- efree(&s);
} /* xml_plugins_plugin */
static void
_______________________________________________
Openvas-commits mailing list
[email protected]
http://lists.wald.intevation.org/mailman/listinfo/openvas-commits