[lxc-devel] [PATCH] fix realloc() error on reboot container
Vitaly Lavrov
vel21ripn at gmail.com
Thu Feb 27 09:01:00 UTC 2014
lxc-1.0.0
The container with "lxc.network.type=phys" halted with error on reboot.
Error message:
*** glibc detected *** lxc-start: realloc(): invalid pointer: 0x0948eed0 ***
We have a sequence:
1) conf->saved_nic = relloc(NULL) on start start.c:container save_phys_nics()
2) free(conf->saved_nics) after stop container conf.c:lxc_rename_phys_nics_on_shutdown()
3) conf->saved_nic = relloc(conf->saved_nics) on restart container start.c:save_phys_nics() -> error relloc()
free(conf->saved_nics) in lxc_rename_phys_nics_on_shutdown() unnecessary, it will be called later in lxc_clear_saved_nics().
Signed-off-by: Vitaly Lavrov <vel21ripn at gmail.com>
--
src/lxc/conf.c | 4 +---
1 file changed, 1 insertions(+), 3 deletion(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lxc.physnetdev.realloc.diff
Type: text/x-patch
Size: 633 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20140227/b6069fba/attachment.bin>
More information about the lxc-devel
mailing list