bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] md5: accepts a new --threads option


From: Jim Meyering
Subject: Re: [PATCH] md5: accepts a new --threads option
Date: Fri, 23 Oct 2009 12:34:05 +0200

Pádraig Brady wrote:
> diff --git a/lib/md2.c b/lib/md2.c
> index cb4c63b..f8878c0 100644
> --- a/lib/md2.c
> +++ b/lib/md2.c
> @@ -33,7 +33,7 @@
>  # include "unlocked-io.h"
>  #endif
>
> -#define BLOCKSIZE 4096
> +#define BLOCKSIZE 32768
>  #if BLOCKSIZE % 64 != 0
>  # error "invalid BLOCKSIZE"
>  #endif
> @@ -94,9 +94,12 @@ int
>  md2_stream (FILE *stream, void *resblock)
>  {
>    struct md2_ctx ctx;
> -  char buffer[BLOCKSIZE + 72];
>    size_t sum;
>
> +  char* buffer = malloc(BLOCKSIZE + 72);

Spacing:

     char *buffer = malloc (BLOCKSIZE + 72);

> +  if (!buffer)
> +    return 1;

Where is that memory freed?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]