projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91982cc
)
ntpd plugin: Fix buffer reallocation when the message is send in more than one packet.
author
Lubos Stanek
<lubek@users.sourceforge.net>
Sat, 4 Nov 2006 12:14:11 +0000
(13:14 +0100)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Sat, 4 Nov 2006 12:14:11 +0000
(13:14 +0100)
src/ntpd.c
patch
|
blob
|
history
diff --git
a/src/ntpd.c
b/src/ntpd.c
index
d65d1ed
..
5204270
100644
(file)
--- a/
src/ntpd.c
+++ b/
src/ntpd.c
@@
-694,6
+694,7
@@
static int ntpd_receive_response (int req_code, int *res_items, int *res_size,
(items_num + pkt_item_num) * res_item_size);
items = realloc ((void *) *res_data,
(items_num + pkt_item_num) * res_item_size);
+ items_num += pkt_item_num;
if (items == NULL)
{
items = *res_data;