projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updated build tips for updated win32 port by Chris Larsen
[rrdtool.git]
/
src
/
rrd_daemon.c
diff --git
a/src/rrd_daemon.c
b/src/rrd_daemon.c
index
b80ddc4
..
4c3d7ed
100644
(file)
--- a/
src/rrd_daemon.c
+++ b/
src/rrd_daemon.c
@@
-1476,7
+1476,7
@@
static int handle_request_update (HANDLER_PROTO) /* {{{ */
static int handle_request_fetch (HANDLER_PROTO) /* {{{ */
{
static int handle_request_fetch (HANDLER_PROTO) /* {{{ */
{
- char *file;
+ char *file
, file_tmp[PATH_MAX]
;
char *cf;
char *start_str;
char *cf;
char *start_str;
@@
-1530,6
+1530,9
@@
static int handle_request_fetch (HANDLER_PROTO) /* {{{ */
if (status != 0)
return (syntax_error(sock,cmd));
if (status != 0)
return (syntax_error(sock,cmd));
+ get_abs_path(&file, file_tmp);
+ if (!check_file_access(file, sock)) return 0;
+
status = flush_file (file);
if ((status != 0) && (status != ENOENT))
return (send_response (sock, RESP_ERR,
status = flush_file (file);
if ((status != 0) && (status != ENOENT))
return (send_response (sock, RESP_ERR,
@@
-1628,7
+1631,9
@@
static int handle_request_fetch (HANDLER_PROTO) /* {{{ */
if (i > 0)
SSTRCAT (linebuf, " ", linebuf_fill);
SSTRCAT (linebuf, ds_namv[i], linebuf_fill);
if (i > 0)
SSTRCAT (linebuf, " ", linebuf_fill);
SSTRCAT (linebuf, ds_namv[i], linebuf_fill);
+ rrd_freemem(ds_namv[i]);
}
}
+ rrd_freemem(ds_namv);
add_response_info (sock, "DSName: %s\n", linebuf);
}
add_response_info (sock, "DSName: %s\n", linebuf);
}
@@
-1654,6
+1659,7
@@
static int handle_request_fetch (HANDLER_PROTO) /* {{{ */
add_response_info (sock, "%10lu:%s\n", (unsigned long) t, linebuf);
} /* for (t) */
add_response_info (sock, "%10lu:%s\n", (unsigned long) t, linebuf);
} /* for (t) */
+ rrd_freemem(data);
return (send_response (sock, RESP_OK, "Success\n"));
#undef SSTRCAT
return (send_response (sock, RESP_OK, "Success\n"));
#undef SSTRCAT