The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/2191

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1751780

Signed-off-by: Christian Brauner <[email protected]>
From 07d7dc94383a4978bce4ae084f653139a602cf4b Mon Sep 17 00:00:00 2001
From: Christian Brauner <[email protected]>
Date: Mon, 26 Feb 2018 15:30:56 +0100
Subject: [PATCH] lxc-snapshot: fix segfault

https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1751780

Signed-off-by: Christian Brauner <[email protected]>
---
 src/lxc/tools/lxc_snapshot.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/lxc/tools/lxc_snapshot.c b/src/lxc/tools/lxc_snapshot.c
index 19542b374..52ddd8fe9 100644
--- a/src/lxc/tools/lxc_snapshot.c
+++ b/src/lxc/tools/lxc_snapshot.c
@@ -126,6 +126,12 @@ int main(int argc, char *argv[])
                }
        }
 
+       if (!c->lxc_conf) {
+               fprintf(stderr, "No container config specified\n");
+               lxc_container_put(c);
+               exit(EXIT_FAILURE);
+       }
+
        if (!c->may_control(c)) {
                fprintf(stderr, "Insufficent privileges to control %s\n",
                        my_args.name);
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to