bozo: Fix memory leak, check for malloc failures 51/14551/5
authorCheyenne Wills <cwills@sinenomine.net>
Fri, 12 Mar 2021 19:29:57 +0000 (12:29 -0700)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 12 Mar 2021 22:18:58 +0000 (17:18 -0500)
commitc49d383f99969a98da34accf8666a5f3ae6c98d8
tree35e42f672d5d9ce197efbbd361132cc9949a5640
parent1bd68506be3243c5670aaf53798b2e4e715d4c8b
bozo: Fix memory leak, check for malloc failures

While reading the BosConfig file, the buffer obtained to hold the notp
(notify) parameter is never freed. Reading the BosConfig is only
done once at bosserver start up, so this is a one-time memory
allocation.

There are no checks for malloc failures.

Release the notp buffer and add checks for memory allocation errors.

Change-Id: Iffcb0db12f983a6a6d6a810a98be30152fa73c89
Reviewed-on: https://gerrit.openafs.org/14551
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
src/bozo/bosserver.c