summaryrefslogtreecommitdiff
path: root/src/strv.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-03-31 15:35:40 +0200
committerLennart Poettering <lennart@poettering.net>2011-03-31 15:35:40 +0200
commitda19d5c19f60ec80e1733b1e994311c59c6eda73 (patch)
tree1df3b703d728471e1051e23778f857bf4adff23f /src/strv.c
parentba1a55152c50dfbcd3d4a64353b95f4a2f37985e (diff)
src: our lord is coverity
Diffstat (limited to 'src/strv.c')
-rw-r--r--src/strv.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/strv.c b/src/strv.c
index c8ff5745e..c5f8df06d 100644
--- a/src/strv.c
+++ b/src/strv.c
@@ -78,9 +78,11 @@ char **strv_copy(char **l) {
return r;
fail:
- for (k--, l--; k >= r; k--, l--)
+ for (k--; k >= r; k--)
free(*k);
+ free(r);
+
return NULL;
}
@@ -435,6 +437,8 @@ char **strv_env_merge(unsigned n_lists, ...) {
return r;
fail:
+ va_end(ap);
+
for (k--; k >= r; k--)
free(*k);