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-gnulib.c | |
parent | c5d8261e0e5c4675b6238af2f25cad968b94d8c8 (diff) | |
download | gnulib-d0299ff4fc16cda1ba3c9e1913bd31f31ccb261f.tar.gz |
* gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
Diffstat (limited to 'lib/gc-gnulib.c')
-rw-r--r-- | lib/gc-gnulib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gc-gnulib.c b/lib/gc-gnulib.c index 61143b0de2..c0fa2e3e2c 100644 --- a/lib/gc-gnulib.c +++ b/lib/gc-gnulib.c @@ -192,6 +192,8 @@ gc_cipher_open (Gc_cipher alg, Gc_cipher_mode mode, Gc_rc rc = GC_OK; ctx = calloc (sizeof (*ctx), 1); + if (!ctx) + return GC_MALLOC_ERROR; ctx->alg = alg; ctx->mode = mode; |