diff options
author | delphij <delphij@FreeBSD.org> | 2017-03-28 04:48:17 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2017-03-28 04:48:17 +0000 |
commit | 9e55018b05bf06a66cff34b38d0513f3e6ce1693 (patch) | |
tree | 902f92e264fe4e9744915013573ddc0d77146551 /contrib/ntp/sntp/kod_management.c | |
parent | d39342cfdc6bedaba7e1c71da4f06feb63517476 (diff) | |
download | FreeBSD-src-9e55018b05bf06a66cff34b38d0513f3e6ce1693.zip FreeBSD-src-9e55018b05bf06a66cff34b38d0513f3e6ce1693.tar.gz |
MFC r315871: MFV r315791: ntp 4.2.8p10.
Diffstat (limited to 'contrib/ntp/sntp/kod_management.c')
-rw-r--r-- | contrib/ntp/sntp/kod_management.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/ntp/sntp/kod_management.c b/contrib/ntp/sntp/kod_management.c index c8df3bd..b378bf2 100644 --- a/contrib/ntp/sntp/kod_management.c +++ b/contrib/ntp/sntp/kod_management.c @@ -246,6 +246,7 @@ kod_init_kod_db( rewind(db_s); + /* Allocate the array of pointers to the struct kod_entry items */ kod_db = eallocarray(kod_db_cnt, sizeof(kod_db[0])); /* Read contents of file */ @@ -265,7 +266,8 @@ kod_init_kod_db( continue; } - kod_db[b] = emalloc(sizeof(*kod_db[b])); + /* Allocate this struct kod_entry item */ + kod_db[b] = emalloc(sizeof(*kod_db[0])); if (3 != sscanf(fbuf, "%llx %4s %254s", &ull, kod_db[b]->type, kod_db[b]->hostname)) { |