From: Andreas Schwab Date: Fri, 20 Jul 2007 14:29:06 +0000 (+0200) Subject: * src/sort.c (main): Don't free a pointer to non-malloc'd memory. X-Git-Tag: v6.9.89~224 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0cf61819479ad43533b6e24d769a8e85c7a17f11;p=thirdparty%2Fcoreutils.git * src/sort.c (main): Don't free a pointer to non-malloc'd memory. --- diff --git a/ChangeLog b/ChangeLog index d6e2e05ba0..ee81676728 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-07-20 Andreas Schwab + + * src/sort.c (main): Don't free a pointer to non-malloc'd memory. + 2007-07-19 Jim Meyering Fix a portability bug in the new ls-color test. diff --git a/src/sort.c b/src/sort.c index 29a3c18055..824dd0d231 100644 --- a/src/sort.c +++ b/src/sort.c @@ -2874,10 +2874,7 @@ main (int argc, char **argv) if (! (key->sword | key->schar)) key->sword = SIZE_MAX; if (! s || *set_ordering (s, key, bl_start)) - { - free (key); - key = NULL; - } + key = NULL; else { if (minus_pos_usage)