]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - dispose_cmd.c
commit bash-20140214 snapshot
[thirdparty/bash.git] / dispose_cmd.c
index 36c195f9f9fe60ea785c4f6dc461937ec68ea8a4..c624605b5080a5ee144fe2747d72b7a3f5a59139 100644 (file)
@@ -1,22 +1,22 @@
 /* dispose_command.c -- dispose of a COMMAND structure. */
 
-/* Copyright (C) 1987-2008 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
 
    This file is part of GNU Bash, the Bourne Again SHell.
 
-   Bash is free software; you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
+   Bash is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
 
-   Bash is distributed in the hope that it will be useful, but WITHOUT
-   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
-   License for more details.
+   Bash is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with Bash; see the file COPYING.  If not, write to the Free
-   Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
+   along with Bash.  If not, see <http://www.gnu.org/licenses/>.
+*/
 
 #include "config.h"
 
@@ -92,6 +92,14 @@ dispose_command (command)
        break;
       }
 
+    case cm_coproc:
+      {
+       free (command->value.Coproc->name);
+       dispose_command (command->value.Coproc->command);
+       free (command->value.Coproc);
+       break;
+      }
+
     case cm_case:
       {
        register CASE_COM *c;
@@ -301,6 +309,10 @@ dispose_redirects (list)
     {
       t = list;
       list = list->next;
+
+      if (t->rflags & REDIR_VARASSIGN)
+       dispose_word (t->redirector.filename);
+
       switch (t->instruction)
        {
        case r_reading_until: