Skip to content

Commit 417c9f4

Browse files
committed
ach_create_len was used, but same calculation overwrites result
1 parent c34a775 commit 417c9f4

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/klinux/ach_klinux.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,6 @@ static struct ach_header *ach_create(const char *name, size_t frame_cnt, size_t
232232
struct ach_header *shm;
233233
int len = ach_create_len(frame_cnt, frame_size);
234234

235-
len = sizeof(struct ach_header) +
236-
frame_cnt * sizeof(ach_index_t) +
237-
frame_cnt * frame_size + 3 * sizeof(uint64_t);
238-
239235
shm = (struct ach_header *)kzalloc(len, GFP_KERNEL);
240236
if (unlikely(!shm)) {
241237
printk(KERN_ERR "ach: Unable to allocate buffer memory\n");

0 commit comments

Comments
 (0)