projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
* gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
[pspp]
/
lib
/
gc-gnulib.c
diff --git
a/lib/gc-gnulib.c
b/lib/gc-gnulib.c
index 61143b0de28a286508278285bf9931215e2fb1a2..c0fa2e3e2c6e4f6e8ca7afe09194f65edf742265 100644
(file)
--- 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;