changeset 1760:b9e8f52f49b4

(mode_compile): Upon allocation failure, free everything starting with the head, not the tail.
author Jim Meyering <jim@meyering.net>
date Sun, 28 Mar 1999 05:44:33 +0000
parents de0cd24e7d54
children 14b8e8de40c8
files lib/modechange.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
 	      change->next = talloc (struct mode_change);
 	      if (change->next == NULL)
 		{
-		  mode_free (change);
+		  mode_free (head);
 		  return MODE_MEMORY_EXHAUSTED;
 		}
 	      change = change->next;