X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fstore.c;h=b1a47799b2f6fda42383aba192e4e69057f73a13;hb=b6040544759110aa97f93e9ba0dd8232cd5e5188;hp=2bb3490e18b611d644d2b7d5a878516c84110a6b;hpb=4d8bb202c2acd917cba95c35d45f832481b85e56;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/store.c b/src/src/store.c index 2bb3490e1..b1a47799b 100644 --- a/src/src/store.c +++ b/src/src/store.c @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2012 */ +/* Copyright (c) University of Cambridge 1995 - 2016 */ /* See the file NOTICE for conditions of use and distribution. */ /* Exim gets and frees all its store through these functions. In the original @@ -354,7 +354,11 @@ the released memory. */ newlength = bc + b->length - (char *)ptr; #ifndef COMPILE_UTILITY -if (running_in_test_harness) memset(ptr, 0xF0, newlength); +if (running_in_test_harness) + { + (void) VALGRIND_MAKE_MEM_DEFINED(ptr, newlength); + memset(ptr, 0xF0, newlength); + } #endif (void) VALGRIND_MAKE_MEM_NOACCESS(ptr, newlength); yield_length[store_pool] = newlength - (newlength % alignment); @@ -493,9 +497,8 @@ store_malloc_3(int size, const char *filename, int linenumber) void *yield; if (size < 16) size = 16; -yield = malloc((size_t)size); -if (yield == NULL) +if (!(yield = malloc((size_t)size))) log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to malloc %d bytes of memory: " "called from line %d of %s", size, linenumber, filename);