- s = malloc(sizeof(struct cache_entry));
- memset(s, 0, sizeof(struct cache_entry));
- s->avl.key = s->entry = strdup(entry);
+ s = calloc_a(sizeof(*s),
+ &entry_buf, strlen(entry) + 1,
+ &host_buf, hlen ? hlen + 1 : 0);
+
+ s->avl.key = s->entry = strcpy(entry_buf, entry);