[dovecot-cvs] dovecot/src/dict dict-cache.c, 1.2, 1.3 dict-server.c, 1.7, 1.8 main.c, 1.4, 1.5

cras at dovecot.org cras at dovecot.org
Sat Jan 14 20:47:23 EET 2006


Update of /var/lib/cvs/dovecot/src/dict
In directory talvi:/tmp/cvs-serv16037/dict

Modified Files:
	dict-cache.c dict-server.c main.c 
Log Message:
deinit, unref, destroy, close, free, etc. functions now take a pointer to
their data pointer, and set it to NULL. This makes double-frees less likely
to cause security holes.



Index: dict-cache.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/dict/dict-cache.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- dict-cache.c	11 Jan 2006 21:48:14 -0000	1.2
+++ dict-cache.c	14 Jan 2006 18:47:21 -0000	1.3
@@ -57,7 +57,7 @@
 		return;
 
 	hash_remove(cache->dicts, uri);
-	dict_deinit(entry->dict);
+	dict_deinit(&entry->dict);
 	i_free(entry->uri);
 	i_free(entry);
 }

Index: dict-server.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/dict/dict-server.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- dict-server.c	13 Jan 2006 12:45:08 -0000	1.7
+++ dict-server.c	14 Jan 2006 18:47:21 -0000	1.8
@@ -367,9 +367,9 @@
 		array_free(&conn->transactions);
 	}
 
-	io_remove(conn->io);
-	i_stream_unref(conn->input);
-	o_stream_unref(conn->output);
+	io_remove(&conn->io);
+	i_stream_unref(&conn->input);
+	o_stream_unref(&conn->output);
 	if (close(conn->fd) < 0)
 		i_error("close(dict client) failed: %m");
 
@@ -447,7 +447,7 @@
 	dict_cache_deinit(server->cache);
 	if (close(server->fd) < 0)
 		i_error("close(%s) failed: %m", server->path);
-	io_remove(server->io);
+	io_remove(&server->io);
 	i_free(server->path);
 	i_free(server);
 }

Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/dict/main.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- main.c	11 Jan 2006 23:47:02 -0000	1.4
+++ main.c	14 Jan 2006 18:47:21 -0000	1.5
@@ -71,7 +71,7 @@
 {
 	dict_server_deinit(dict_server);
 
-	module_dir_unload(modules);
+	module_dir_unload(&modules);
 
 	dict_sql_unregister();
 	dict_client_unregister();
@@ -99,7 +99,7 @@
         io_loop_run(ioloop);
 	main_deinit();
 
-	io_loop_destroy(ioloop);
+	io_loop_destroy(&ioloop);
 	lib_deinit();
 
 	return 0;



More information about the dovecot-cvs mailing list