Author: bh
Date: 2007-07-24 18:49:38 +0200 (Tue, 24 Jul 2007)
New Revision: 308
Modified:
trunk/openvas-libraries/ChangeLog
trunk/openvas-libraries/libopenvas/network.c
Log:
* libopenvas/network.c (load_file, unload_file): Use emalloc and
efree to be consistent with the rest of the libopenvas code
Modified: trunk/openvas-libraries/ChangeLog
===================================================================
--- trunk/openvas-libraries/ChangeLog 2007-07-24 15:55:31 UTC (rev 307)
+++ trunk/openvas-libraries/ChangeLog 2007-07-24 16:49:38 UTC (rev 308)
@@ -1,3 +1,8 @@
+2007-07-24 Bernhard Herzog <[EMAIL PROTECTED]>
+
+ * libopenvas/network.c (load_file, unload_file): Use emalloc and
+ efree to be consistent with the rest of the libopenvas code
+
2007-07-20 Jan-Oliver Wagner <[EMAIL PROTECTED]>
* libopenvas/services.h: Fixed location of openvas-services.
Modified: trunk/openvas-libraries/libopenvas/network.c
===================================================================
--- trunk/openvas-libraries/libopenvas/network.c 2007-07-24 15:55:31 UTC
(rev 307)
+++ trunk/openvas-libraries/libopenvas/network.c 2007-07-24 16:49:38 UTC
(rev 308)
@@ -590,7 +590,7 @@
|| fseek(f, 0, SEEK_END) != 0
|| (filelen = ftell(f)) < 0
|| fseek(f, 0, SEEK_SET) != 0
- || !(ptr = malloc((size_t) filelen))
+ || !(ptr = emalloc((size_t) filelen))
|| fread(ptr, 1, (size_t) filelen, f) < (size_t) filelen)
{
return loaded_file;
@@ -609,8 +609,7 @@
static void
unload_file (gnutls_datum * data)
{
- free(data->data);
- data->data = NULL;
+ efree(&(data->data));
}
/* Loads a certificate and the corresponding private key from PEM files.
_______________________________________________
Openvas-commits mailing list
[email protected]
http://lists.wald.intevation.org/mailman/listinfo/openvas-commits