]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r298839:
authorngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 13 May 2016 09:52:39 +0000 (09:52 +0000)
committerngie <ngie@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 13 May 2016 09:52:39 +0000 (09:52 +0000)
commit160b4e86b497ad3b36ab7536d38095e592dfe698
tree95eb98e99c8c36fa0ae54b8c8c0d6f4b0b8d67e2
parent884705e90a6c80314d3826c1016206d56614d817
MFC r298839:

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

git-svn-id: svn://svn.freebsd.org/base/stable/10@299651 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libkvm/kvm_proc.c