[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103897: Use xfree instead of free wh
From: |
Andreas Schwab |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103897: Use xfree instead of free where appropriate (Bug#8437) |
Date: |
Tue, 12 Apr 2011 12:20:32 +0200 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 103897
committer: Andreas Schwab <address@hidden>
branch nick: emacs
timestamp: Tue 2011-04-12 12:20:32 +0200
message:
Use xfree instead of free where appropriate (Bug#8437)
* charset.c (Fclear_charset_maps): Use xfree instead of free.
(Bug#8437)
* keyboard.c (parse_tool_bar_item): Likewise.
* sound.c (sound_cleanup, alsa_close): Likewise.
* termcap.c (tgetent): Likewise.
* xfns.c (x_default_font_parameter): Likewise.
* xsettings.c (read_and_apply_settings): Likewise.
modified:
src/ChangeLog
src/charset.c
src/keyboard.c
src/sound.c
src/termcap.c
src/xfns.c
src/xsettings.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-04-12 10:20:32 +0000
+++ b/src/ChangeLog 2011-04-12 10:20:32 +0000
@@ -1,5 +1,13 @@
2011-04-12 Andreas Schwab <address@hidden>
+ * charset.c (Fclear_charset_maps): Use xfree instead of free.
+ (Bug#8437)
+ * keyboard.c (parse_tool_bar_item): Likewise.
+ * sound.c (sound_cleanup, alsa_close): Likewise.
+ * termcap.c (tgetent): Likewise.
+ * xfns.c (x_default_font_parameter): Likewise.
+ * xsettings.c (read_and_apply_settings): Likewise.
+
* alloc.c (overrun_check_malloc, overrun_check_realloc)
(overrun_check_free): Protoize.
=== modified file 'src/charset.c'
--- a/src/charset.c 2011-04-09 20:46:34 +0000
+++ b/src/charset.c 2011-04-12 10:20:32 +0000
@@ -2145,7 +2145,7 @@
{
if (temp_charset_work)
{
- free (temp_charset_work);
+ xfree (temp_charset_work);
temp_charset_work = NULL;
}
=== modified file 'src/keyboard.c'
--- a/src/keyboard.c 2011-04-09 19:12:39 +0000
+++ b/src/keyboard.c 2011-04-12 10:20:32 +0000
@@ -8253,7 +8253,7 @@
PROP (TOOL_BAR_ITEM_LABEL) = new_lbl;
else
PROP (TOOL_BAR_ITEM_LABEL) = make_string ("", 0);
- free (buf);
+ xfree (buf);
}
/* If got a filter apply it on binding. */
=== modified file 'src/sound.c'
--- a/src/sound.c 2011-04-10 20:43:08 +0000
+++ b/src/sound.c 2011-04-12 10:20:32 +0000
@@ -460,8 +460,8 @@
current_sound_device->close (current_sound_device);
if (current_sound->fd > 0)
emacs_close (current_sound->fd);
- free (current_sound_device);
- free (current_sound);
+ xfree (current_sound_device);
+ xfree (current_sound);
return Qnil;
}
@@ -1095,7 +1095,7 @@
snd_pcm_drain (p->handle);
snd_pcm_close (p->handle);
}
- free (p);
+ xfree (p);
}
}
=== modified file 'src/termcap.c'
--- a/src/termcap.c 2011-03-12 12:03:24 +0000
+++ b/src/termcap.c 2011-04-12 10:20:32 +0000
@@ -1,6 +1,6 @@
/* Work-alike for termcap, plus extra features.
Copyright (C) 1985, 1986, 1993, 1994, 1995, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007, 2008, 2011 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
@@ -468,15 +468,15 @@
if (scan_file (term, fd, &buf) == 0)
{
close (fd);
- free (buf.beg);
+ xfree (buf.beg);
if (malloc_size)
- free (bp);
+ xfree (bp);
return 0;
}
/* Free old `term' if appropriate. */
if (term != name)
- free (term);
+ xfree (term);
/* If BP is malloc'd by us, make sure it is big enough. */
if (malloc_size)
@@ -506,7 +506,7 @@
}
close (fd);
- free (buf.beg);
+ xfree (buf.beg);
if (malloc_size)
bp = (char *) xrealloc (bp, bp1 - bp + 1);
=== modified file 'src/xfns.c'
--- a/src/xfns.c 2011-04-07 03:34:05 +0000
+++ b/src/xfns.c 2011-04-12 10:20:32 +0000
@@ -2983,7 +2983,7 @@
{
char *name = xstrdup (system_font);
font = font_open_by_name (f, name);
- free (name);
+ xfree (name);
}
}
=== modified file 'src/xsettings.c'
--- a/src/xsettings.c 2011-02-12 05:13:34 +0000
+++ b/src/xsettings.c 2011-04-12 10:20:32 +0000
@@ -566,20 +566,20 @@
if (send_event_p)
store_config_changed_event (Qtool_bar_style, dpyname);
}
- free (settings.tb_style);
+ xfree (settings.tb_style);
}
if (settings.seen & SEEN_FONT)
{
if (!current_font || strcmp (current_font, settings.font) != 0)
{
- free (current_font);
+ xfree (current_font);
current_font = settings.font;
if (send_event_p)
store_config_changed_event (Qfont_name, dpyname);
}
else
- free (settings.font);
+ xfree (settings.font);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103897: Use xfree instead of free where appropriate (Bug#8437),
Andreas Schwab <=