Commit graph

4 commits

Author SHA1 Message Date
Andrea Canciani
e04e368748 Remove useless checks for NULL before freeing
This patch has been generated by the following Coccinelle semantic patch:
// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it

@@
expression E;
@@
+ free (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
-   free(E);
(
-   E = NULL;
|
-   E = 0;
)
   ...
- }

@@
expression E;
@@
+ free (E);
- if (unlikely (E != NULL)) {
-   free (E);
- }
2011-07-31 16:46:36 +02:00
Andrea Canciani
b8a7f8621a Update FSF address
I updated the Free Software Foundation address using the following script.

for i in $(git grep Temple | cut -d: -f1 )
do
  sed -e 's/59 Temple Place[, -]* Suite 330, Boston, MA *02111-1307[, ]* USA/51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA/' -i "$i"
done

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21356
2010-04-27 11:13:38 +02:00
Behdad Esfahbod
30a16df29b [util/backtrace-symbols] Implement backtrace_symbols_fd() 2008-05-27 04:45:37 -04:00
Behdad Esfahbod
3b46e105bd [util] Import my malloc wrapper that prints simple statistics
To build, do:

	make malloc-stats.so

inside util/, and to use, run:

	LD_PRELOAD=malloc-stats.so some-program

For binaries managed by libtool, eg, cairo-perf, do:

	../libtool --mode=execute /bin/true ./cairo-perf
	LD_PRELOAD="../util/malloc-stats.so" .libs/lt-cairo-perf

The code also includes Jeff Muizelaar's libbacktracesymbols that
is a much better implementation of backtrace_symbols() than what
is provided by glibc.  That can be built by:

	make backtrace-symbols.so
2007-04-21 08:23:15 -04:00