At this point conn->last_modified may or may not be allocated.
If it is, overriting it will leak 30 bytes.
Index: http.c
===================================================================
RCS file: /cvs/src/usr.sbin/rpki-client/http.c,v
retrieving revision 1.52
diff -u -p -r1.52 http.c
--- http.c 23 Jan 2022 12:09:24 -0000 1.52
+++ http.c 10 Feb 2022 02:09:38 -0000
@@ -1231,6 +1231,7 @@ http_parse_header(struct http_connection
} else if (strncasecmp(cp, LAST_MODIFIED,
sizeof(LAST_MODIFIED) - 1) == 0) {
cp += sizeof(LAST_MODIFIED) - 1;
+ free(conn->last_modified);
if ((conn->last_modified = strdup(cp)) == NULL)
err(1, NULL);
}