1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

some fixes in remapping code which caused memory leaks

This commit is contained in:
Steffen Vogel 2017-09-24 00:01:27 -06:00
parent 003650eb21
commit f8c73553eb
2 changed files with 2 additions and 2 deletions

View file

@ -347,9 +347,9 @@ int mapping_remap(struct list *m, struct sample *remapped, struct sample *origin
/* We copy all the header fields */
remapped->sequence = original->sequence;
remapped->pool_off = (char *) sample_pool(original) - (char *) remapped;
remapped->source = original->source;
remapped->ts = original->ts;
remapped->id = original->id;
for (size_t i = 0; i < list_length(m); i++) {
struct mapping_entry *me = list_at(m, i);

View file

@ -96,8 +96,8 @@ int sample_copy(struct sample *dst, struct sample *src)
dst->sequence = src->sequence;
dst->format = src->format;
dst->source = src->source;
dst->id = src->id;
dst->flags = src->flags;
dst->ts = src->ts;
memcpy(&dst->data, &src->data, SAMPLE_DATA_LEN(dst->length));