diff options
author | ngie <ngie@FreeBSD.org> | 2016-04-30 09:13:26 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2016-04-30 09:13:26 +0000 |
commit | 874567745a9accd16d4202ffcb2482517474f2f8 (patch) | |
tree | 5e2b583361331cc065489c37ffba4258719c6e75 /lib/libbsdstat/bsdstat.h | |
parent | 470b1c2a5e88c5167cc16afc572255dfac167af1 (diff) | |
download | FreeBSD-src-874567745a9accd16d4202ffcb2482517474f2f8.zip FreeBSD-src-874567745a9accd16d4202ffcb2482517474f2f8.tar.gz |
Fix memory allocation edgecases in kvm_argv(..)
- Don't leak nbufp on realloc failure in kvm_argv
- Catch malloc errors with bufp
- Set buflen last in the "buflen == 0" case to ensure that
bufp/nbufp is properly reallocated on the next go around
Differential Revision: https://reviews.freebsd.org/D6051
MFC after: 1 week
Reviewed by: jhb, markj
Reported by: cppcheck
Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'lib/libbsdstat/bsdstat.h')
0 files changed, 0 insertions, 0 deletions