bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

memory leak


From: Piotr Orchowski
Subject: memory leak
Date: Sat, 31 Jan 2009 18:51:30 +0100

Hi

I'm getting momory leaks when trying to use pl_laberl_r, pla_alabel_r
functions:

(void)pl_alabel_r(plotter,'c','c', s);
(void)pl_label_r(plotter, s);
(void)pl_label_r(plotter, (const char *)s);

where s is:
char s[10];
 sprintf(s, "%d",some_int_number);

==4483== 12,544 bytes in 49 blocks are possibly lost in loss record 126 of
132
==4483==    at 0x401C422: malloc (vg_replace_malloc.c:149)
==4483==    by 0x481D4CC: _plot_xmalloc (in /usr/lib/libplot.so.2.2.1)
==4483==    by 0x484DCD5: _x_select_xlfd_font_carefully (in
/usr/lib/libplot.so.2.2.1)
==4483==    by 0x484E43C: _x_retrieve_font (in /usr/lib/libplot.so.2.2.1)
==4483==    by 0x4818760: _set_font (in /usr/lib/libplot.so.2.2.1)
==4483==    by 0x4809D57: _render_non_hershey_string (in
/usr/lib/libplot.so.2.2.1)
==4483==    by 0x480AA5B: pl_alabel_r (in /usr/lib/libplot.so.2.2.1)
==4483==    by 0x480AADF: pl_label_r (in /usr/lib/libplot.so.2.2.1)
==4483==    by 0x804E060: Draw (drawing.c:189)
==4483==    by 0x8063165: qmorph_main (quad.c:201)
==4483==    by 0x80523F2: read_params (functions.c:2134)
==4483==    by 0x80544E0: main (main.cpp:19)
==4483==
==4483==
==4483== 3,259,656 bytes in 12,735 blocks are definitely lost in loss record
132 of 132
==4483==    at 0x401C422: malloc (vg_replace_malloc.c:149)
==4483==    by 0x481D4CC: _plot_xmalloc (in /usr/lib/libplot.so.2.2.1)
==4483==    by 0x484DCD5: _x_select_xlfd_font_carefully (in
/usr/lib/libplot.so.2.2.1)
==4483==    by 0x484E43C: _x_retrieve_font (in /usr/lib/libplot.so.2.2.1)
==4483==    by 0x4818760: _set_font (in /usr/lib/libplot.so.2.2.1)
==4483==    by 0x4809D57: _render_non_hershey_string (in
/usr/lib/libplot.so.2.2.1)
==4483==    by 0x4809A0F: _render_non_hershey_string (in
/usr/lib/libplot.so.2.2.1)
==4483==    by 0x480AA5B: pl_alabel_r (in /usr/lib/libplot.so.2.2.1)
==4483==    by 0x480AADF: pl_label_r (in /usr/lib/libplot.so.2.2.1)
==4483==    by 0x804E060: Draw (drawing.c:189)
==4483==    by 0x8063165: qmorph_main (quad.c:201)
==4483==    by 0x80523F2: read_params (functions.c:2134)
============

Looking at the documentation I'm using those functions correctly.

plotutils version:
(GNU plotutils) 2.5

Rgs

Piotr Orchowski


reply via email to

[Prev in Thread] Current Thread [Next in Thread]