clock: Fix memleak in clock_management_fill_response()

If the message is ignored, the tlv_extra isn't freed. Fix this.

Signed-off-by: Michael Walle <michael@walle.cc>
master
Michael Walle 2018-06-26 11:55:22 +02:00 committed by Richard Cochran
parent 6ba73d18b1
commit 763a7ecdb2
1 changed files with 1 additions and 0 deletions

View File

@ -440,6 +440,7 @@ static int clock_management_fill_response(struct clock *c, struct port *p,
break;
default:
/* The caller should *not* respond to this message. */
tlv_extra_recycle(extra);
return 0;
}
if (datalen % 2) {