9e8aa8efbc
These are important enough that the LXD team picks them into their snap Closes #16918
42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
From 6453ba565ed7e3be9b3c9fa74ac07cf8e06b9afc Mon Sep 17 00:00:00 2001
|
|
From: Christian Brauner <christian.brauner@ubuntu.com>
|
|
Date: Tue, 23 Jul 2019 16:41:46 +0200
|
|
Subject: [PATCH] tree-wide: initialize all auto-cleanup variables
|
|
|
|
Closes: #3101.
|
|
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
|
|
---
|
|
src/lxc/cgroups/cgfsng.c | 2 +-
|
|
src/lxc/confile.c | 6 +++---
|
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git src/lxc/cgroups/cgfsng.c src/lxc/cgroups/cgfsng.c
|
|
index 87e12d2ddd..7b8fe6736f 100644
|
|
--- src/lxc/cgroups/cgfsng.c
|
|
+++ src/lxc/cgroups/cgfsng.c
|
|
@@ -1260,7 +1260,7 @@ static int mkdir_eexist_on_last(const char *dir, mode_t mode)
|
|
|
|
orig_len = strlen(dir);
|
|
do {
|
|
- __do_free char *makeme;
|
|
+ __do_free char *makeme = NULL;
|
|
int ret;
|
|
size_t cur_len;
|
|
|
|
diff --git src/lxc/confile.c src/lxc/confile.c
|
|
index 36d62cbcac..c0cba7c547 100644
|
|
--- src/lxc/confile.c
|
|
+++ src/lxc/confile.c
|
|
@@ -909,9 +909,9 @@ static int set_config_net_ipv6_gateway(const char *key, const char *value,
|
|
static int set_config_net_veth_ipv6_route(const char *key, const char *value,
|
|
struct lxc_conf *lxc_conf, void *data)
|
|
{
|
|
- __do_free char *valdup;
|
|
- __do_free struct lxc_inet6dev *inet6dev;
|
|
- __do_free struct lxc_list *list;
|
|
+ __do_free char *valdup = NULL;
|
|
+ __do_free struct lxc_inet6dev *inet6dev = NULL;
|
|
+ __do_free struct lxc_list *list = NULL;
|
|
int ret;
|
|
char *netmask, *slash;
|
|
struct lxc_netdev *netdev = data;
|