aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-02-02 02:05:24 -0500
committerMike Frysinger <vapier@gentoo.org>2009-02-02 02:05:24 -0500
commitff1976a7b23b583ec9e9b17a6b2953b1258f78c5 (patch)
tree4578e46d7f5145151cabd271402293b50737b1b5 /src
parentlibsandbox: let real funcs handle non-existent paths (diff)
downloadsandbox-ff1976a7b23b583ec9e9b17a6b2953b1258f78c5.tar.gz
sandbox-ff1976a7b23b583ec9e9b17a6b2953b1258f78c5.tar.bz2
sandbox-ff1976a7b23b583ec9e9b17a6b2953b1258f78c5.zip
sandbox: fixup a few more NULL memory checks
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'src')
-rw-r--r--src/environ.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/environ.c b/src/environ.c
index c2c7ab5..e792f8d 100644
--- a/src/environ.c
+++ b/src/environ.c
@@ -71,8 +71,7 @@ static char *subst_env_vars(rc_dynbuf_t *env_data)
return tmp_data;
error:
- if (NULL != new_data)
- rc_dynbuf_free(new_data);
+ rc_dynbuf_free(new_data);
if (NULL != tmp_data)
free(tmp_data);
@@ -101,7 +100,7 @@ static int setup_access_var(const char *access_var)
rc_dynbuf_t *env_data;
int count = 0;
char *config;
- char **confd_files;
+ char **confd_files = NULL;
bool use_confd = true;
env_data = rc_dynbuf_new();
@@ -145,6 +144,7 @@ static int setup_access_var(const char *access_var)
}
str_list_free(confd_files);
+ confd_files = NULL;
}
done:
@@ -164,8 +164,7 @@ done:
return 0;
error:
- if (NULL != env_data)
- rc_dynbuf_free(env_data);
+ rc_dynbuf_free(env_data);
if (NULL != config)
free(config);
if (NULL != confd_files)