diff options
author | Timo Schulz <twoaday@freakmail.de> | 2002-01-01 11:26:05 +0000 |
---|---|---|
committer | Timo Schulz <twoaday@freakmail.de> | 2002-01-01 11:26:05 +0000 |
commit | 01cbc7529f6ced95c72ead856f3c703905586783 (patch) | |
tree | 99dba02d7836997c960de6c91755f767eda0ddf4 /src/stdmem.c | |
parent | 4041bd7556742f414c6b9c13fa4f984bb1b83f70 (diff) | |
download | libgcrypt-01cbc7529f6ced95c72ead856f3c703905586783.tar.gz |
Fixed a bug in the memory allocation.
Diffstat (limited to 'src/stdmem.c')
-rw-r--r-- | src/stdmem.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stdmem.c b/src/stdmem.c index fe459bd5..d27b4aa0 100644 --- a/src/stdmem.c +++ b/src/stdmem.c @@ -113,6 +113,9 @@ _gcry_private_realloc( void *a, size_t n ) void *b; size_t len; + if (!a) + return _gcry_private_malloc(n); + _gcry_private_check_heap(p); len = p[-4]; len |= p[-3] << 8; |