Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jul 2007 08:17:15 GMT
From:      Andrew Turner <andrew@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 123834 for review
Message-ID:  <200707210817.l6L8HF1c031557@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=123834

Change 123834 by andrew@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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707210817.l6L8HF1c031557>