Eliminate some problems flagged by static analysis

Signed-off-by: Michael Leibowitz <michael.leibowitz@intel.com>