diff options
author | Edward O'Callaghan <quasisec@google.com> | 2023-01-15 14:50:25 +1100 |
---|---|---|
committer | Anastasia Klimchuk <aklm@chromium.org> | 2023-01-22 05:56:12 +0000 |
commit | dd41980f1784c91dd8b30a9074a260621d366c2e (patch) | |
tree | a9a006d60a296cc3a92f4826348185aeff5b30ec /tests/helpers.c | |
parent | 46856234b3b6dea93e38c499eecbb432cb1e455e (diff) | |
download | flashrom-dd41980f1784c91dd8b30a9074a260621d366c2e.tar.gz flashrom-dd41980f1784c91dd8b30a9074a260621d366c2e.tar.bz2 flashrom-dd41980f1784c91dd8b30a9074a260621d366c2e.zip |
tests/: Assert on NULL heap allocations in tests
Change-Id: Id2adcfe859fb25d2a7f0734655c6b9a58c0890b6
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/71919
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Diffstat (limited to 'tests/helpers.c')
-rw-r--r-- | tests/helpers.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/helpers.c b/tests/helpers.c index e2e652ed..271fb483 100644 --- a/tests/helpers.c +++ b/tests/helpers.c @@ -45,6 +45,7 @@ void strcat_realloc_test_success(void **state) const char src0[] = "hello"; const char src1[] = " world"; char *dest = calloc(1, 1); + assert_non_null(dest); dest = strcat_realloc(dest, src0); dest = strcat_realloc(dest, src1); assert_string_equal("hello world", dest); |