]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/linuxptp.git/commit
Properly initialize the message lists.
authorRichard Cochran <richardcochran@gmail.com>
Sun, 1 Nov 2015 11:30:51 +0000 (12:30 +0100)
committerRichard Cochran <richardcochran@gmail.com>
Sun, 3 Apr 2016 12:45:41 +0000 (14:45 +0200)
commit01dcf7e9ac2c7d8bec3bbc69b44d1f83b3dfa44e
treeabaa4ab017a50ea4947291a0b10c905131de80de
parent3f2ef92052ea957fa6591d3045e915f40663b47c
Properly initialize the message lists.

The message lists are implemented using a TAILQ from queue(3).  The heads
of the list must be initialized using the provided macros, since the field
called 'tqh_last' is non-zero in the initial state.  This patch fixes a
potential null pointer dereference by properly initializing the queues.

Note that there is no actual bug in the current code, because it uses the
lists in such a way as to initialize 'tqh_last' before any dereference.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
msg.c
port.c