diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-03-31 15:35:40 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-03-31 15:35:40 +0200 |
commit | da19d5c19f60ec80e1733b1e994311c59c6eda73 (patch) | |
tree | 1df3b703d728471e1051e23778f857bf4adff23f /src/strv.c | |
parent | ba1a55152c50dfbcd3d4a64353b95f4a2f37985e (diff) |
src: our lord is coverity
Diffstat (limited to 'src/strv.c')
-rw-r--r-- | src/strv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/strv.c b/src/strv.c index c8ff5745e8..c5f8df06da 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); |