mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-03 05:05:29 +00:00
Fix an assert caused by faulty sort-queue management.
sq.h - sq_items_release(): When clearing the items_inuse array, ensure that all of the memory is cleared. items_inuse is a uint array, not a byte array. Author: Mark Wutzke <markw@alliedtelesis.co.nz> git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1655 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
4042395616
commit
94a523702f
@ -277,7 +277,7 @@ static inline void sq_items_release (struct sq *sq, unsigned int seqid)
|
||||
if ((oldhead + seqid - sq->head_seqid + 1) > sq->size) {
|
||||
// printf ("releasing %d for %d\n", oldhead, sq->size - oldhead);
|
||||
// printf ("releasing %d for %d\n", 0, sq->head);
|
||||
memset (&sq->items_inuse[oldhead], 0, sq->size - oldhead);
|
||||
memset (&sq->items_inuse[oldhead], 0, (sq->size - oldhead) * sizeof (unsigned int));
|
||||
memset (sq->items_inuse, 0, sq->head * sizeof (unsigned int));
|
||||
} else {
|
||||
// printf ("releasing %d for %d\n", oldhead, seqid - sq->head_seqid + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user