Commit 1cc8e7f9595db4aa8d3e79361376d1a0e7064635

Stefan Sperling 2018-03-15T00:31:05

remove a useless and leaky allocation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/lib/pack.c b/lib/pack.c
index 61c669a..06e9700 100644
--- a/lib/pack.c
+++ b/lib/pack.c
@@ -1007,9 +1007,6 @@ add_delta_cache_entry(struct got_delta_cache *cache, off_t data_offset,
 	}
 
 	entry = &cache->deltas[i];
-	entry->delta_buf = calloc(1, delta_len);
-	if (entry->delta_buf == NULL)
-		return got_error(GOT_ERR_NO_MEM);
 	entry->data_offset = data_offset;
 	entry->delta_buf = delta_buf;
 	entry->delta_len = delta_len;