chiark / gitweb /
dhcp: fix creation of req_opts array
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 31 Dec 2013 16:57:38 +0000 (11:57 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 31 Dec 2013 18:00:57 +0000 (13:00 -0500)
commit7a7c74cae4db0c35cbe54d9bad8418a605cb870f
tree019942adb3e3186d9fcaff32c895048449ed5afc
parentaa9ed6538985d667aa6a0264c59622a51384ccd6
dhcp: fix creation of req_opts array

GREEDY_REALLOC needs to have two size variables: one for the
allocated size, and a second one for the used size. Using
the allocated size only lead to leaving some elements unitialized
and assigning some more than once.
src/libsystemd-dhcp/dhcp-client.c
src/libsystemd-dhcp/test-dhcp-client.c