X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=lib-crypt%2Fpgppacket.c;h=0956076526ccf4de7d398d5ccf18db4e9112584c;hb=3f35b8874fb10587ce43e2853a1ef95573222015;hp=2cfddbb34802542918616d7116cd8c30728a1202;hpb=f3cbb9f51357972f6e74244494236a41dc4d84cd;p=apps%2Fmadmutt.git diff --git a/lib-crypt/pgppacket.c b/lib-crypt/pgppacket.c index 2cfddbb..0956076 100644 --- a/lib-crypt/pgppacket.c +++ b/lib-crypt/pgppacket.c @@ -22,17 +22,7 @@ static size_t plen = 0; static int read_material (size_t material, size_t * used, FILE * fp) { if (*used + material >= plen) { - unsigned char *p; - size_t nplen; - - nplen = *used + material + CHUNKSIZE; - - if (!(p = realloc(pbuf, nplen))) { - perror ("realloc"); - return -1; - } - plen = nplen; - pbuf = p; + p_realloc(&pbuf, plen = *used + material + CHUNKSIZE); } if (fread (pbuf + *used, 1, material, fp) < material) {