diff options
| author | Andreas Schwab | 2011-04-12 12:20:32 +0200 |
|---|---|---|
| committer | Andreas Schwab | 2011-04-12 12:20:32 +0200 |
| commit | baad03f0e1fe3bf27d52a425e0e374af6d1cf407 (patch) | |
| tree | e86f0c3b393c801dd2f77c3fdadff8eb789712b1 /src/termcap.c | |
| parent | e7974947bc66f311e3883bb19aec11f3fe4dc7f6 (diff) | |
| download | emacs-baad03f0e1fe3bf27d52a425e0e374af6d1cf407.tar.gz emacs-baad03f0e1fe3bf27d52a425e0e374af6d1cf407.zip | |
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.
Diffstat (limited to 'src/termcap.c')
| -rw-r--r-- | src/termcap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/termcap.c b/src/termcap.c index 27a20a67ae1..5b71ad229d7 100644 --- a/src/termcap.c +++ b/src/termcap.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Work-alike for termcap, plus extra features. | 1 | /* Work-alike for termcap, plus extra features. |
| 2 | Copyright (C) 1985, 1986, 1993, 1994, 1995, 2000, 2001, 2002, 2003, | 2 | Copyright (C) 1985, 1986, 1993, 1994, 1995, 2000, 2001, 2002, 2003, |
| 3 | 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | 3 | 2004, 2005, 2006, 2007, 2008, 2011 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
| @@ -468,15 +468,15 @@ tgetent (char *bp, const char *name) | |||
| 468 | if (scan_file (term, fd, &buf) == 0) | 468 | if (scan_file (term, fd, &buf) == 0) |
| 469 | { | 469 | { |
| 470 | close (fd); | 470 | close (fd); |
| 471 | free (buf.beg); | 471 | xfree (buf.beg); |
| 472 | if (malloc_size) | 472 | if (malloc_size) |
| 473 | free (bp); | 473 | xfree (bp); |
| 474 | return 0; | 474 | return 0; |
| 475 | } | 475 | } |
| 476 | 476 | ||
| 477 | /* Free old `term' if appropriate. */ | 477 | /* Free old `term' if appropriate. */ |
| 478 | if (term != name) | 478 | if (term != name) |
| 479 | free (term); | 479 | xfree (term); |
| 480 | 480 | ||
| 481 | /* If BP is malloc'd by us, make sure it is big enough. */ | 481 | /* If BP is malloc'd by us, make sure it is big enough. */ |
| 482 | if (malloc_size) | 482 | if (malloc_size) |
| @@ -506,7 +506,7 @@ tgetent (char *bp, const char *name) | |||
| 506 | } | 506 | } |
| 507 | 507 | ||
| 508 | close (fd); | 508 | close (fd); |
| 509 | free (buf.beg); | 509 | xfree (buf.beg); |
| 510 | 510 | ||
| 511 | if (malloc_size) | 511 | if (malloc_size) |
| 512 | bp = (char *) xrealloc (bp, bp1 - bp + 1); | 512 | bp = (char *) xrealloc (bp, bp1 - bp + 1); |