libgcov: replace malloc and calloc.

The calloc was in the original tested version of the patch
and I made accidental last minute change.

Installed to master as obvious.

libgcc/ChangeLog:

	* libgcov.h (gcov_topn_add_value): Use xcalloc instead
	of xmalloc.
This commit is contained in:
Martin Liska 2020-06-02 13:57:31 +02:00
parent 0bd4508f86
commit a04b7410d3
No known key found for this signature in database
GPG Key ID: 4DC182DC0FA73785
1 changed files with 1 additions and 1 deletions

View File

@ -443,7 +443,7 @@ gcov_topn_add_value (gcov_type *counters, gcov_type value, gcov_type count,
else
{
struct gcov_kvp *new_node
= (struct gcov_kvp *)xmalloc (sizeof (struct gcov_kvp));
= (struct gcov_kvp *)xcalloc (1, sizeof (struct gcov_kvp));
new_node->value = value;
new_node->count = count;