summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-07-23 03:58:47 +0200
committerTom Gundersen <teg@jklm.no>2015-07-23 03:58:47 +0200
commitf7d51e1c19aaf26e7b23661d43e71c9e6fcf7adf (patch)
treea78ed242a5f74c8065a0f04529ccedfb7c71eda2
parentef9132b77e393331c2e2a97c85b8da0a7d863b83 (diff)
parent2c1fb4f71206bf970d493294208c5d7597194856 (diff)
Merge pull request #667 from poettering/dns-rr-memleak
resolve: fix two minor memory leaks
-rw-r--r--src/resolve/resolved-dns-rr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c
index 859b3f7339..9c12205ab8 100644
--- a/src/resolve/resolved-dns-rr.c
+++ b/src/resolve/resolved-dns-rr.c
@@ -533,7 +533,7 @@ static char *format_types(Bitmap *types) {
BITMAP_FOREACH(type, types, i) {
if (dns_type_to_string(type)) {
- r = strv_extend(&strv, strdup(dns_type_to_string(type)));
+ r = strv_extend(&strv, dns_type_to_string(type));
if (r < 0)
return NULL;
} else {
@@ -543,7 +543,7 @@ static char *format_types(Bitmap *types) {
if (r < 0)
return NULL;
- r = strv_extend(&strv, t);
+ r = strv_consume(&strv, t);
if (r < 0)
return NULL;
}