summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-03-28 05:44:33 +0000
committerJim Meyering <jim@meyering.net>1999-03-28 05:44:33 +0000
commit581baf7d99ee7d034eeb06039efc9626af0b7989 (patch)
tree8c4f04c81d0a860b39bc6cd94bf7e209f46619ef /lib
parent7ca462d86501161050aeb8deb4753ceeac3646bf (diff)
downloadcoreutils-581baf7d99ee7d034eeb06039efc9626af0b7989.tar.xz
(mode_compile): Upon allocation failure, free
everything starting with the head, not the tail.
Diffstat (limited to 'lib')
-rw-r--r--lib/modechange.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/modechange.c b/lib/modechange.c
index 4dccdb0f3..057803124 100644
--- a/lib/modechange.c
+++ b/lib/modechange.c
@@ -1,5 +1,5 @@
/* modechange.c -- file mode manipulation
- Copyright (C) 1989, 1990, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1990, 1997, 1998, 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -171,7 +171,7 @@ mode_compile (const char *mode_string, unsigned int masked_ops)
change->next = talloc (struct mode_change);
if (change->next == NULL)
{
- mode_free (change);
+ mode_free (head);
return MODE_MEMORY_EXHAUSTED;
}
change = change->next;