mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-24 00:29:58 -05:00
- Fix memory leak in sldns_buffer_new_frm_data.
git-svn-id: file:///svn/unbound/trunk@4230 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
acada5a8f6
commit
df78cb7ccb
2 changed files with 3 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
16 June 2017: Wouter
|
16 June 2017: Wouter
|
||||||
- Fix #1301: memory leak in respip and tests.
|
- Fix #1301: memory leak in respip and tests.
|
||||||
- Free callback in edns-subnetmod on exit and restart.
|
- Free callback in edns-subnetmod on exit and restart.
|
||||||
|
- Fix memory leak in sldns_buffer_new_frm_data.
|
||||||
|
|
||||||
15 June 2017: Wouter
|
15 June 2017: Wouter
|
||||||
- Fix stub zone queries leaking to the internet for
|
- Fix stub zone queries leaking to the internet for
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,8 @@ sldns_buffer_new_frm_data(sldns_buffer *buffer, void *data, size_t size)
|
||||||
buffer->_limit = buffer->_capacity = size;
|
buffer->_limit = buffer->_capacity = size;
|
||||||
buffer->_fixed = 0;
|
buffer->_fixed = 0;
|
||||||
buffer->_vfixed = 0;
|
buffer->_vfixed = 0;
|
||||||
|
if (!buffer->_fixed && buffer->_data)
|
||||||
|
free(buffer->_data);
|
||||||
buffer->_data = malloc(size);
|
buffer->_data = malloc(size);
|
||||||
if(!buffer->_data) {
|
if(!buffer->_data) {
|
||||||
buffer->_status_err = 1;
|
buffer->_status_err = 1;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue