]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
attacg: shut up gcc
authortomponline <tomp@tomp.uk>
Sat, 2 Mar 2019 10:14:32 +0000 (10:14 +0000)
committertomponline <tomp@tomp.uk>
Mon, 4 Mar 2019 07:59:33 +0000 (07:59 +0000)
Invalid warning but let's please the compiler.

Closes lxc#2885.

Signed-off-by: tomponline <tomp@tomp.uk>
src/lxc/attach.c

index f4e43e2b62d8d4e95e5da9dae05e105cf0e5688a..d3ab98422814729bea82a3c6abe999fc90669936 100644 (file)
@@ -669,7 +669,7 @@ static bool no_new_privs(struct lxc_container *c, lxc_attach_options_t *options)
 
 static signed long get_personality(const char *name, const char *lxcpath)
 {
-       __do_free char *p;
+       __do_free char *p = NULL;
 
        p = lxc_cmd_get_config_item(name, "lxc.arch", lxcpath);
        if (!p)