void freemsg(mblk_t *mp);
Architecture independent level 1 (DDI/DKI).
mp Pointer to the message blocks to be deallocated. mblk_t is an instance of the msgb(9S) structure. If mp is NULL, freemsg() immediately returns.
The freemsg() function calls freeb(9F) to free all message and data blocks associated with the message pointed to by mp.
The freemsg() function can be called from user, interrupt, or kernel context.
Example 1: Using freemsg()
copymsg(9F), freeb(9F), msgb(9S)
Writing Device Drivers
STREAMS Programming Guide
The behavior of freemsg() when passed a NULL pointer is Solaris-specific.