mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Free buf after usage.
CID: 1199377 Found with: Coverity Prevent(tm) MFC after: 1 week
This commit is contained in:
parent
7946c49fd8
commit
a1761d7335
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=264422
@ -1746,8 +1746,10 @@ __elfN(note_threadmd)(void *arg, struct sbuf *sb, size_t *sizep)
|
||||
size = 0;
|
||||
__elfN(dump_thread)(td, buf, &size);
|
||||
KASSERT(*sizep == size, ("invalid size"));
|
||||
if (size != 0 && sb != NULL)
|
||||
if (size != 0 && sb != NULL) {
|
||||
sbuf_bcat(sb, buf, size);
|
||||
free(buf, M_TEMP);
|
||||
}
|
||||
*sizep = size;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user