diff --git a/include/villas/sample.h b/include/villas/sample.h index f7fbffe56..707058739 100644 --- a/include/villas/sample.h +++ b/include/villas/sample.h @@ -78,7 +78,7 @@ struct sample { }; /** Request \p cnt samples from memory pool \p p and initialize them. - * This will leave the reference count of the sample to zero. + * The reference count will already be set to 1. * Use the sample_get() function to increase it. */ int sample_alloc(struct pool *p, struct sample *smps[], int cnt); diff --git a/lib/nodes/shmem.c b/lib/nodes/shmem.c index 0ea7b4a9c..0541b2db8 100644 --- a/lib/nodes/shmem.c +++ b/lib/nodes/shmem.c @@ -203,8 +203,6 @@ int shmem_write(struct node *n, struct sample *smps[], unsigned cnt) memcpy(shared_smps[i]->data, smps[i]->data, SAMPLE_DATA_LEN(len)); shared_smps[i]->length = len; - - sample_get(shared_smps[i]); } if (atomic_load_explicit(&shm->shared->ext_stopped, memory_order_relaxed)) {