mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(mode_compile): Upon allocation failure, free
everything starting with the head, not the tail.
This commit is contained in:
1 parent
7ca462d865
commit
581baf7d99
1 file changed
+2
-2
+2
-2
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user