]> xenbits.xensource.com Git - libvirt.git/commit
Coverity: Resolve a FORWARD_NULL
authorJohn Ferlan <jferlan@redhat.com>
Tue, 25 Mar 2014 17:03:19 +0000 (13:03 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 25 Mar 2014 21:13:27 +0000 (17:13 -0400)
commite38264f310c6aa8173676317bc8dd4f3c3550412
tree9efe1a73d51c2f5b4b22e9f2cfbdefe0881aa44c
parentb2e4ace220f86a74fb788c0c9f0f37ec238eabf8
Coverity: Resolve a FORWARD_NULL

Recent changes in the module seemed to have caused Coverity to reanalyze
certain parts of the code. Previously the code was modified via commit
id '11a11812' to resolve a different error (perhaps DEADCODE).  Up through
commit id '7b3f1f8c' there were no issues.

The new error indicats the 'outbuf' was checked for NULL and then complains
because of the dereference. Adding checks for non-NULL prior to the deref
resulted in a DEADCODE message.

So, resolve using an sa_assert() to keep Coverity quiet especially since
it doesn't understand that outbuf will change as a result of a successful
virCommandRun() call.
tests/commandtest.c