rrd_open: include rrd_tool.h at the very start so that utime.h gets included if...
[rrdtool.git] / src / rrd_daemon.c
index 25675a1..4c7b6bd 100644 (file)
@@ -1572,7 +1572,7 @@ static int handle_request_fetch (HANDLER_PROTO) /* {{{ */
     value = strtol (end_str, &endptr, /* base = */ 0);
     if ((endptr == end_str) || (errno != 0))
       return (send_response(sock, RESP_ERR,
-            "Cannot parse start time `%s': Only simple integers are allowed.\n",
+            "Cannot parse end time `%s': Only simple integers are allowed.\n",
             end_str));
 
     if (value > 0)
@@ -1628,7 +1628,9 @@ static int handle_request_fetch (HANDLER_PROTO) /* {{{ */
       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);
   }
 
@@ -1654,6 +1656,7 @@ static int handle_request_fetch (HANDLER_PROTO) /* {{{ */
 
     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