Signed-off-by: Dwight Engen <dwight.en...@oracle.com> --- src/lxc/lxc_info.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/lxc/lxc_info.c b/src/lxc/lxc_info.c index 23cf789..a4fa3e1 100644 --- a/src/lxc/lxc_info.c +++ b/src/lxc/lxc_info.c @@ -124,12 +124,14 @@ int main(int argc, char *argv[]) if (ips) { char **addresses = c->get_ips(c, NULL, NULL, 0); - char *address; - i = 0; - while (addresses[i]) { - address = addresses[i]; - printf("ip: \t%s\n", address); - i++; + if (addresses) { + char *address; + i = 0; + while (addresses[i]) { + address = addresses[i]; + printf("ip: \t%s\n", address); + i++; + } } } -- 1.8.1.4 ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel