mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 12:03:41 +08:00
* strings.c (print_strings): Plug memory leak.
This commit is contained in:
parent
b42adabf1e
commit
68187828c0
@ -1,3 +1,7 @@
|
||||
2011-03-25 Michael Snyder <msnyder@vmware.com>
|
||||
|
||||
* strings.c (print_strings): Plug memory leak.
|
||||
|
||||
2011-03-25 Pierre Muller <muller@ics.u-strasbg.fr>
|
||||
|
||||
Replace bfd_vma type and analog types by dwarf_vma and analogs.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* strings -- print the strings of printable characters in files
|
||||
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -549,7 +549,10 @@ print_strings (const char *filename, FILE *stream, file_ptr address,
|
||||
{
|
||||
c = get_char (stream, &address, &magiccount, &magic);
|
||||
if (c == EOF)
|
||||
return;
|
||||
{
|
||||
free (buf);
|
||||
return;
|
||||
}
|
||||
if (! STRING_ISGRAPHIC (c))
|
||||
/* Found a non-graphic. Try again starting with next char. */
|
||||
goto tryline;
|
||||
@ -638,6 +641,7 @@ print_strings (const char *filename, FILE *stream, file_ptr address,
|
||||
|
||||
putchar ('\n');
|
||||
}
|
||||
free (buf);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user