PERFORCE change 123834 for review

Andrew Turner andrew at FreeBSD.org
Sat Jul 21 08:17:16 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=123834

Change 123834 by andrew at andrew_hermies on 2007/07/21 08:17:03

	In a facuns array only free obj_array_count items. Without this valgrind complains about invalid reads as the last item may not be NULL;

Affected files ...

.. //depot/projects/soc2007/andrew-update/lib/facund_object.c#8 edit

Differences ...

==== //depot/projects/soc2007/andrew-update/lib/facund_object.c#8 (text+ko) ====

@@ -338,7 +338,7 @@
 	if (obj->obj_array != NULL) {
 		unsigned int i;
 
-		for (i = 0; obj->obj_array[i] != NULL; i++) {
+		for (i = 0; i < obj->obj_array_count; i++) {
 			facund_object_free(obj->obj_array[i]);
 		}
 		free(obj->obj_array);


More information about the p4-projects mailing list