summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd/resolve-util.h2
-rw-r--r--src/libsystemd/sd-resolve.c11
-rw-r--r--src/libsystemd/test-resolve.c2
3 files changed, 1 insertions, 14 deletions
diff --git a/src/libsystemd/resolve-util.h b/src/libsystemd/resolve-util.h
index 4310f88504..58df7385c0 100644
--- a/src/libsystemd/resolve-util.h
+++ b/src/libsystemd/resolve-util.h
@@ -24,8 +24,6 @@
#include "util.h"
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_resolve*, sd_resolve_free);
-DEFINE_TRIVIAL_CLEANUP_FUNC(unsigned char *, sd_resolve_freeanswer);
DEFINE_TRIVIAL_CLEANUP_FUNC(struct addrinfo*, sd_resolve_freeaddrinfo);
#define _cleanup_resolve_free_ _cleanup_(sd_resolve_freep)
-#define _cleanup_resolve_answer_free_ _cleanup_(sd_resolve_freeanswerp)
#define _cleanup_resolve_addrinfo_free_ _cleanup_(sd_resolve_freeaddrinfop)
diff --git a/src/libsystemd/sd-resolve.c b/src/libsystemd/sd-resolve.c
index a368c1b13c..6958aa9410 100644
--- a/src/libsystemd/sd-resolve.c
+++ b/src/libsystemd/sd-resolve.c
@@ -1105,17 +1105,6 @@ void sd_resolve_freeaddrinfo(struct addrinfo *ai) {
errno = saved_errno;
}
-void sd_resolve_freeanswer(unsigned char *answer) {
- int saved_errno = errno;
-
- if (!answer)
- return;
-
- free(answer);
-
- errno = saved_errno;
-}
-
int sd_resolve_isdone(sd_resolve *resolve, sd_resolve_query*q) {
assert(resolve);
assert(q);
diff --git a/src/libsystemd/test-resolve.c b/src/libsystemd/test-resolve.c
index 7c1e7aa32c..3903e64d70 100644
--- a/src/libsystemd/test-resolve.c
+++ b/src/libsystemd/test-resolve.c
@@ -39,7 +39,7 @@ int main(int argc, char *argv[]) {
int r = 1, ret;
_cleanup_resolve_free_ sd_resolve *resolve = NULL;
_cleanup_resolve_addrinfo_free_ struct addrinfo *ai = NULL;
- _cleanup_resolve_answer_free_ unsigned char *srv = NULL;
+ _cleanup_free_ unsigned char *srv = NULL;
sd_resolve_query *q1, *q2, *q3;
struct addrinfo hints = {};
struct sockaddr_in sa = {};