From: Jim Meyering Date: Sun, 28 Mar 1999 05:44:33 +0000 (+0000) Subject: (mode_compile): Upon allocation failure, free X-Git-Tag: cvs-readonly~7412 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=833b6069d0ff88b349c806eed6892490b606a964;p=gnulib.git (mode_compile): Upon allocation failure, free everything starting with the head, not the tail. --- 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;