sd_event_source_unref(g->timer);
sd_event_unref(g->event);
+ free(g);
return NULL;
}
return 1;
}
-int curl_parse_http_time(const char *t, time_t *ret) {
+int curl_parse_http_time(const char *t, usec_t *ret) {
struct tm tm;
time_t v;
if (v == (time_t) -1)
return -EINVAL;
- *ret = v;
+ *ret = (usec_t) v * USEC_PER_SEC;
return 0;
}