diff options
author | Simon Josefsson <simon@josefsson.org> | 2005-10-28 12:13:27 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2005-10-28 12:13:27 +0000 |
commit | d0299ff4fc16cda1ba3c9e1913bd31f31ccb261f (patch) | |
tree | 0a7472083a79137c8e3ba73c1e826437901d525d /lib/gc-libgcrypt.c | |
parent | c5d8261e0e5c4675b6238af2f25cad968b94d8c8 (diff) | |
download | gnulib-d0299ff4fc16cda1ba3c9e1913bd31f31ccb261f.tar.gz |
* gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
Diffstat (limited to 'lib/gc-libgcrypt.c')
-rw-r--r-- | lib/gc-libgcrypt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gc-libgcrypt.c b/lib/gc-libgcrypt.c index bc0d12bbaf..10841e8d43 100644 --- a/lib/gc-libgcrypt.c +++ b/lib/gc-libgcrypt.c @@ -243,6 +243,8 @@ gc_hash_open (Gc_hash hash, Gc_hash_mode mode, gc_hash_handle * outhandle) Gc_rc rc = GC_OK; ctx = calloc (sizeof (*ctx), 1); + if (!ctx) + return GC_MALLOC_ERROR; ctx->alg = hash; ctx->mode = mode; |