chiark / gitweb /
nspawn: fix an incorrect assert comparison
[elogind.git] / src / import / curl-util.c
index 78a58a8a6df6bad89311ae37a34c104d9e9242df..0c6c8673cc75742bfe268abee5f32056f2e344d2 100644 (file)
@@ -236,6 +236,7 @@ CurlGlue *curl_glue_unref(CurlGlue *g) {
 
         sd_event_source_unref(g->timer);
         sd_event_unref(g->event);
+        free(g);
 
         return NULL;
 }
@@ -414,7 +415,7 @@ int curl_header_strdup(const void *contents, size_t sz, const char *field, char
         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;
 
@@ -441,6 +442,6 @@ int curl_parse_http_time(const char *t, time_t *ret) {
         if (v == (time_t) -1)
                 return -EINVAL;
 
-        *ret = v;
+        *ret = (usec_t) v * USEC_PER_SEC;
         return 0;
 }