projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Many rrd_create memory leaks patched ... based on valgrind analysis by Sven Engelhard...
[rrdtool.git]
/
src
/
rrd_graph.c
diff --git
a/src/rrd_graph.c
b/src/rrd_graph.c
index
57a1bb6
..
03027b1
100644
(file)
--- a/
src/rrd_graph.c
+++ b/
src/rrd_graph.c
@@
-2950,8
+2950,8
@@
int graph_paint(
rrd_infoval_t info;
PangoFontMap *font_map = pango_cairo_font_map_get_default();
rrd_infoval_t info;
PangoFontMap *font_map = pango_cairo_font_map_get_default();
- /* if we
are lazy and there is nothing to PRINT
... quit now */
- if (lazy
&& im->prt_c == 0
) {
+ /* if we
want and can be lazy
... quit now */
+ if (lazy) {
info.u_cnt = im->ximg;
grinfo_push(im, sprintf_alloc("image_width"), RD_I_CNT, info);
info.u_cnt = im->yimg;
info.u_cnt = im->ximg;
grinfo_push(im, sprintf_alloc("image_width"), RD_I_CNT, info);
info.u_cnt = im->yimg;
@@
-3667,10
+3667,15
@@
rrd_info_t *rrd_graph_v(
if (im.imginfo) {
rrd_infoval_t info;
if (im.imginfo) {
rrd_infoval_t info;
-
+ char *filename;
+ filename=im.graphfile+strlen(im.graphfile);
+ while(filename > im.graphfile) {
+ if (*(filename-1)=='/' || *(filename-1)=='\\' ) break;
+ filename--;
+ }
info.u_str =
sprintf_alloc(im.imginfo,
info.u_str =
sprintf_alloc(im.imginfo,
-
im.graphfil
e,
+
filenam
e,
(long) (im.zoom *
im.ximg), (long) (im.zoom * im.yimg));
grinfo_push(&im, sprintf_alloc("image_info"), RD_I_STR, info);
(long) (im.zoom *
im.ximg), (long) (im.zoom * im.yimg));
grinfo_push(&im, sprintf_alloc("image_info"), RD_I_STR, info);