GNU bug report logs - #13098
[PATCH] cut.c: Fix memory leak

Previous Next

Package: coreutils;

Reported by: Cojocaru Alexandru <xojoc <at> gmx.com>

Date: Thu, 6 Dec 2012 02:17:01 UTC

Severity: normal

Tags: patch

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Cojocaru Alexandru <xojoc <at> gmx.com>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 13098-done <at> debbugs.gnu.org
Subject: bug#13098: [PATCH] cut.c: Fix memory leak
Date: Thu, 6 Dec 2012 17:59:41 +0100
> Hmm, it might be a bit more consistent to guard all
> references to the bit vector array with max_range_endpoint?
> How about the attached?

I checked for `n_rp' and `printable_field' becuase it felt more
natural.
I reasoned as follows: first check if we have any finite ranges (n_rp) if yes,
allocate memory for `printable_field'. Then check if `printable_field'
has been allocated memory, if yes access it.
Anyway both are good solutions.

Best regards,
Cojocaru Alexandru




This bug report was last modified 12 years and 223 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.