[Openvas-commits] r3504 - in trunk/openvas-libraries: . libopenvascommon

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu May 28 09:41:33 CEST 2009


Author: felix
Date: 2009-05-28 09:41:33 +0200 (Thu, 28 May 2009)
New Revision: 3504

Modified:
   trunk/openvas-libraries/ChangeLog
   trunk/openvas-libraries/libopenvascommon/nvti.c
Log:
* libopenvascommon/nvti.c (nvti_to_keyfile): Fixed mem leak by freeing
text, added TODO as function returns 0 also in case of errors.


Modified: trunk/openvas-libraries/ChangeLog
===================================================================
--- trunk/openvas-libraries/ChangeLog	2009-05-28 07:27:42 UTC (rev 3503)
+++ trunk/openvas-libraries/ChangeLog	2009-05-28 07:41:33 UTC (rev 3504)
@@ -1,3 +1,8 @@
+2009-05-28  Felix Wolfsteller  <felix.wolfsteller at intevation.de>
+
+	* libopenvascommon/nvti.c (nvti_to_keyfile): Fixed mem leak by freeing
+	text, added TODO as function returns 0 also in case of errors.
+
 2009-05-27  Matthew Mundell <mmundell at intevation.de>
 
 	* libopenvascommon/nvti.c: Correct function name.

Modified: trunk/openvas-libraries/libopenvascommon/nvti.c
===================================================================
--- trunk/openvas-libraries/libopenvascommon/nvti.c	2009-05-28 07:27:42 UTC (rev 3503)
+++ trunk/openvas-libraries/libopenvascommon/nvti.c	2009-05-28 07:41:33 UTC (rev 3504)
@@ -850,7 +850,7 @@
  *
  * @param fn The filename to write to.
  *
- * @return 0 on success. Anything else indicates an error.
+ * @return 0 on success. @TODO Anything else indicates an error.
  */
 int
 nvti_to_keyfile (const nvti_t * n, const gchar * fn)
@@ -913,5 +913,7 @@
     }
 
   g_key_file_free (keyfile);
+  g_free (text);
+
   return (0);
 }



More information about the Openvas-commits mailing list