summaryrefslogtreecommitdiffstats
path: root/lib/replace
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-01-01 17:56:30 +0100
committerJeremy Allison <jra@samba.org>2014-01-24 13:55:47 -0800
commit50cc510584f0a97175c563a96bd641ead874dc93 (patch)
treed954f08b27b4c071e15cd228559771156f788c73 /lib/replace
parentc6edb37f28d55cb985724d2ec124a4a53577f451 (diff)
downloadsamba-50cc510584f0a97175c563a96bd641ead874dc93.tar.gz
samba-50cc510584f0a97175c563a96bd641ead874dc93.tar.xz
samba-50cc510584f0a97175c563a96bd641ead874dc93.zip
libreplace: free() deals fine with NULL pointers
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/replace')
-rw-r--r--lib/replace/getaddrinfo.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/replace/getaddrinfo.c b/lib/replace/getaddrinfo.c
index c5cd52be93c..8440d8e6f3e 100644
--- a/lib/replace/getaddrinfo.c
+++ b/lib/replace/getaddrinfo.c
@@ -321,12 +321,8 @@ void rep_freeaddrinfo(struct addrinfo *res)
for (;res; res = next) {
next = res->ai_next;
- if (res->ai_canonname) {
- free(res->ai_canonname);
- }
- if (res->ai_addr) {
- free(res->ai_addr);
- }
+ free(res->ai_canonname);
+ free(res->ai_addr);
free(res);
}
}