mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
fix unmapped ring buffers in dma.cpp leading to segfault
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This commit is contained in:
parent
e93b8e998d
commit
d34ab182e4
1 changed files with 12 additions and 9 deletions
|
@ -193,15 +193,18 @@ bool Dma::reset()
|
|||
return false;
|
||||
}
|
||||
|
||||
Dma::~Dma()
|
||||
{
|
||||
// Unmap memory in our ownership, MemoryBlock gets deleted and removed from
|
||||
// graph by this destructor as well.
|
||||
if (hasScatterGather()) {
|
||||
card->unmapMemoryBlock(*sgRingTx);
|
||||
card->unmapMemoryBlock(*sgRingRx);
|
||||
}
|
||||
Dma::reset();
|
||||
Dma::~Dma() {
|
||||
// Unmap memory in our ownership, MemoryBlock gets deleted and removed from
|
||||
// graph by this destructor as well.
|
||||
if (hasScatterGather()) {
|
||||
if (sgRingTx) {
|
||||
card->unmapMemoryBlock(*sgRingTx);
|
||||
}
|
||||
if (sgRingRx) {
|
||||
card->unmapMemoryBlock(*sgRingRx);
|
||||
}
|
||||
}
|
||||
Dma::reset();
|
||||
}
|
||||
|
||||
bool Dma::memcpy(const MemoryBlock &src, const MemoryBlock &dst, size_t len)
|
||||
|
|
Loading…
Add table
Reference in a new issue