libsemanage/tests: return when str is NULL
CU_FAIL() does not stop the execution flow. This issue has been found using Infer static analyzer. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
adcc353f6e
commit
7673b97e45
1 changed files with 1 additions and 0 deletions
|
@ -142,6 +142,7 @@ void test_semanage_split_on_space(void)
|
|||
if (!str) {
|
||||
CU_FAIL
|
||||
("semanage_split_on_space: unable to perform test, no memory");
|
||||
return;
|
||||
}
|
||||
temp = semanage_split_on_space(str);
|
||||
CU_ASSERT_STRING_EQUAL(temp, "bar baz");
|
||||
|
|
Loading…
Reference in a new issue