7
mirror of https://github.com/EEVengers/ThunderScope.git synced 2025-04-11 23:19:16 +00:00

Merge pull request from EEVengers/FPGA_DSP_PIPE_HOOKUP

Memory leak fix
This commit is contained in:
Daniel Vasile 2021-03-25 14:46:44 -04:00 committed by GitHub
commit 88fef0a448
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -390,7 +390,7 @@ void PCIeLink::Write(ScopeCommand command, void* val) {
for(int i = 0; i < num_buffers; i++) {
Read(preBuff);
for(int q = 0; q < BUFFER_SIZE; q++) {
if(preBuff[i] & 0x80) {
if(preBuff[q] & 0x80) {
//postive
buffers[i][q] = (int)(preBuff[q] & 0x7F);
} else {
@ -419,6 +419,7 @@ void PCIeLink::Write(ScopeCommand command, void* val) {
for(int i = 0; i < num_buffers; i++) {
free(buffers[i]);
}
free(preBuff);
free(buffers);
}
break;