]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix some memory allocation errors:
authorJamie Gritton <jamie@FreeBSD.org>
Thu, 4 Oct 2012 19:07:05 +0000 (19:07 +0000)
committerJamie Gritton <jamie@FreeBSD.org>
Thu, 4 Oct 2012 19:07:05 +0000 (19:07 +0000)
commit49f903d5fc840f8aa6d8d9777ec726a1e75f1ccf
tree3e2e498ff7f40cd3a336e9c4fb13f69fae9ecc98
parent01591cd5409bc8eb5c2c077e83955dbc1fbd2a85
Fix some memory allocation errors:

* jail_setv will leak a parameter name if jailparam_import fails.
* jailparam_all loses the jailparam pointer on realloc error
  (a clear freshman mistake).
* If jailparam_init fails, the caller doesn't need to jailparam_free
  the buffer.  That's not really clear, so set things to NULL allowing
  jailparam_free to work without error (though it's still not required).
lib/libjail/jail.c