summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.2.238
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2009-08-26 10:00:38 -0500
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:41:17 +0200
commit5a12e7c134274dba706667107d10d231517d3e05 (patch)
tree55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/ap/vim/patches/7.2.238
downloadcurrent-slackware-13.0.tar.gz
current-slackware-13.0.tar.xz
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P.
Diffstat (limited to 'source/ap/vim/patches/7.2.238')
-rw-r--r--source/ap/vim/patches/7.2.238117
1 files changed, 117 insertions, 0 deletions
diff --git a/source/ap/vim/patches/7.2.238 b/source/ap/vim/patches/7.2.238
new file mode 100644
index 000000000..a70976d8f
--- /dev/null
+++ b/source/ap/vim/patches/7.2.238
@@ -0,0 +1,117 @@
+To: vim-dev@vim.org
+Subject: Patch 7.2.238
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.2.238
+Problem: Leaking memory when setting term to "builtin_dumb".
+Solution: Free memory when resetting term option t_Co.
+Files: src/option.c, src/proto/option.pro, src/term.c
+
+
+*** ../vim-7.2.237/src/option.c 2009-06-16 17:50:56.000000000 +0200
+--- src/option.c 2009-07-22 12:49:19.000000000 +0200
+***************
+*** 403,410 ****
+ #define P_NUM 0x02 /* the option is numeric */
+ #define P_STRING 0x04 /* the option is a string */
+ #define P_ALLOCED 0x08 /* the string option is in allocated memory,
+! must use vim_free() when assigning new
+! value. Not set if default is the same. */
+ #define P_EXPAND 0x10 /* environment expansion. NOTE: P_EXPAND can
+ never be used for local or hidden options! */
+ #define P_NODEFAULT 0x40 /* don't set to default value */
+--- 403,411 ----
+ #define P_NUM 0x02 /* the option is numeric */
+ #define P_STRING 0x04 /* the option is a string */
+ #define P_ALLOCED 0x08 /* the string option is in allocated memory,
+! must use free_string_option() when
+! assigning new value. Not set if default is
+! the same. */
+ #define P_EXPAND 0x10 /* environment expansion. NOTE: P_EXPAND can
+ never be used for local or hidden options! */
+ #define P_NODEFAULT 0x40 /* don't set to default value */
+***************
+*** 8927,8932 ****
+--- 8928,8955 ----
+ }
+
+ /*
++ * Free the string for one term option, if it was allocated.
++ * Set the string to empty_option and clear allocated flag.
++ * "var" points to the option value.
++ */
++ void
++ free_one_termoption(var)
++ char_u *var;
++ {
++ struct vimoption *p;
++
++ for (p = &options[0]; p->fullname != NULL; p++)
++ if (p->var == var)
++ {
++ if (p->flags & P_ALLOCED)
++ free_string_option(*(char_u **)(p->var));
++ *(char_u **)(p->var) = empty_option;
++ p->flags &= ~P_ALLOCED;
++ break;
++ }
++ }
++
++ /*
+ * Set the terminal option defaults to the current value.
+ * Used after setting the terminal name.
+ */
+*** ../vim-7.2.237/src/proto/option.pro 2009-02-21 20:27:00.000000000 +0100
+--- src/proto/option.pro 2009-07-22 12:52:31.000000000 +0200
+***************
+*** 29,34 ****
+--- 29,35 ----
+ int makefoldset __ARGS((FILE *fd));
+ void clear_termoptions __ARGS((void));
+ void free_termoptions __ARGS((void));
++ void free_one_termoption __ARGS((char_u *var));
+ void set_term_defaults __ARGS((void));
+ void comp_col __ARGS((void));
+ char_u *get_equalprg __ARGS((void));
+*** ../vim-7.2.237/src/term.c 2009-06-16 14:31:56.000000000 +0200
+--- src/term.c 2009-07-22 13:19:59.000000000 +0200
+***************
+*** 2881,2887 ****
+
+ /* if 'Sb' and 'AB' are not defined, reset "Co" */
+ if (*T_CSB == NUL && *T_CAB == NUL)
+! T_CCO = empty_option;
+
+ /* Set 'weirdinvert' according to value of 't_xs' */
+ p_wiv = (*T_XS != NUL);
+--- 2881,2887 ----
+
+ /* if 'Sb' and 'AB' are not defined, reset "Co" */
+ if (*T_CSB == NUL && *T_CAB == NUL)
+! free_one_termoption(T_CCO);
+
+ /* Set 'weirdinvert' according to value of 't_xs' */
+ p_wiv = (*T_XS != NUL);
+*** ../vim-7.2.237/src/version.c 2009-07-22 13:27:50.000000000 +0200
+--- src/version.c 2009-07-22 14:25:44.000000000 +0200
+***************
+*** 678,679 ****
+--- 678,681 ----
+ { /* Add new patch number below this line */
++ /**/
++ 238,
+ /**/
+
+--
+hundred-and-one symptoms of being an internet addict:
+95. Only communication in your household is through email.
+
+ /// Bram Moolenaar -- Bram@Moolenaar.net -- 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 ///