X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-crypt%2Fpgppacket.c;h=0956076526ccf4de7d398d5ccf18db4e9112584c;hp=d00315480ff7282babe130bc1c52c7c5e79a3300;hb=7d29626ce4e1fa932c6349c7253e6f774df069fc;hpb=1ee89902de184a640c171ae3285bff6882a791bd diff --git a/lib-crypt/pgppacket.c b/lib-crypt/pgppacket.c index d003154..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))) { /* __MEM_CHECKED__ */ - perror ("realloc"); - return -1; - } - plen = nplen; - pbuf = p; + p_realloc(&pbuf, plen = *used + material + CHUNKSIZE); } if (fread (pbuf + *used, 1, material, fp) < material) {