Browse Source

Merge pull request #390 from hamishcoleman/leakfix

Avoid leaking memory if the buffer is uncompressable
pull/406/head
Luca Deri 4 years ago
committed by GitHub
parent
commit
3c98328618
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/edge_utils.c

3
src/edge_utils.c

@ -1488,6 +1488,9 @@ void edge_send_packet2net(n2n_edge_t * eee,
memcpy (tap_pkt, compression_buffer, compression_len); memcpy (tap_pkt, compression_buffer, compression_len);
len = compression_len; len = compression_len;
}
if(compression_buffer) {
free (compression_buffer); free (compression_buffer);
} }
} }

Loading…
Cancel
Save