mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-05-28 04:02:33 -04:00
make fix nicer in perf testcode.
git-svn-id: file:///svn/unbound/trunk@5071 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
d48abb9a84
commit
e584933b2b
1 changed files with 2 additions and 2 deletions
|
|
@ -513,10 +513,10 @@ qlist_grow_capacity(struct perfinfo* info)
|
|||
uint8_t** d = (uint8_t**)calloc(sizeof(uint8_t*), newcap);
|
||||
size_t* l = (size_t*)calloc(sizeof(size_t), newcap);
|
||||
if(!d || !l) fatal_exit("out of memory");
|
||||
if(info->qlist_data)
|
||||
if(info->qlist_data && info->qlist_capacity)
|
||||
memcpy(d, info->qlist_data, sizeof(uint8_t*)*
|
||||
info->qlist_capacity);
|
||||
if(info->qlist_len)
|
||||
if(info->qlist_len && info->qlist_capacity)
|
||||
memcpy(l, info->qlist_len, sizeof(size_t)*
|
||||
info->qlist_capacity);
|
||||
free(info->qlist_data);
|
||||
|
|
|
|||
Loading…
Reference in a new issue