Loading ...
Sorry, an error occurred while loading the content.

Patch 7.1.294

Expand Messages
  • Bram Moolenaar
    Patch 7.1.294 Problem: Leaking memory when executing a shell command. Solution: Free memory when not able to save for undo. (Dominique Pelle) Files:
    Message 1 of 1 , May 7, 2008
    • 0 Attachment
      Patch 7.1.294
      Problem: Leaking memory when executing a shell command.
      Solution: Free memory when not able to save for undo. (Dominique Pelle)
      Files: src/ex_cmds.c

      *** ../vim-7.1.293/src/ex_cmds.c Mon Feb 18 19:41:40 2008
      --- src/ex_cmds.c Sun Apr 13 13:20:15 2008
      ***************
      *** 1160,1165 ****
      --- 1166,1172 ----
      if (!do_out)
      msg_putchar('\n');

      + /* Create the shell command in allocated memory. */
      cmd_buf = make_filter_cmd(cmd, itmp, otmp);
      if (cmd_buf == NULL)
      goto filterend;
      ***************
      *** 1180,1186 ****
      --- 1187,1196 ----
      if (do_out)
      {
      if (u_save((linenr_T)(line2), (linenr_T)(line2 + 1)) == FAIL)
      + {
      + vim_free(cmd_buf);
      goto error;
      + }
      redraw_curbuf_later(VALID);
      }
      read_linecount = curbuf->b_ml.ml_line_count;
      ***************
      *** 4471,4477 ****
      /*
      * The new text is build up step by step, to avoid too much
      * copying. There are these pieces:
      ! * sub_firstline The old text, unmodifed.
      * copycol Column in the old text where we started
      * looking for a match; from here old text still
      * needs to be copied to the new text.
      --- 4481,4487 ----
      /*
      * The new text is build up step by step, to avoid too much
      * copying. There are these pieces:
      ! * sub_firstline The old text, unmodified.
      * copycol Column in the old text where we started
      * looking for a match; from here old text still
      * needs to be copied to the new text.
      *** ../vim-7.1.293/src/version.c Wed Apr 9 15:48:08 2008
      --- src/version.c Wed May 7 13:07:48 2008
      ***************
      *** 668,669 ****
      --- 673,676 ----
      { /* Add new patch number below this line */
      + /**/
      + 294,
      /**/

      --
      It's not hard to meet expenses, they're everywhere.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ download, build and distribute -- http://www.A-A-P.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.