#include <json.h>
-#include "cache.h"
-#include "fcache.h"
-#include "http.h"
-#include "list.h"
-#include "lp_ws.h"
-#include "lp_json.h"
+#include <cache.h>
+#include <fcache.h>
+#include <http.h>
+#include <list.h>
+#include <lp_ws.h>
+#include <lp_json.h>
#include <plog.h>
-#include "ppastats.h"
+#include <ppastats.h>
#include <ptime.h>
/** Default ws.size value for the getPublishedBinaries request. */
if (json) {
cached_ddts = json_object_to_daily_download_totals(json);
+ json_object_put(json);
last_t = ddts_get_last_date(cached_ddts);
} else {
last_t = 0;
free(key);
if (ddts != cached_ddts)
- free(cached_ddts);
- free(retrieved_ddts);
+ daily_download_total_list_free(cached_ddts);
+ daily_download_total_list_free(retrieved_ddts);
return ddts;
}