X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgc-libgcrypt.c;h=10841e8d43ada764c9e4a64d27c10d3a45811bcb;hb=fb84631f1ec8e82d252cbad0b5b7f83a98e74ba9;hp=bc0d12bbaf6b16aae69cafde317effe89dba9252;hpb=c5d8261e0e5c4675b6238af2f25cad968b94d8c8;p=gnulib.git diff --git a/lib/gc-libgcrypt.c b/lib/gc-libgcrypt.c index bc0d12bba..10841e8d4 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;