git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6edb37
)
libreplace: free() deals fine with NULL pointers
author
Volker Lendecke
<vl@samba.org>
Wed, 1 Jan 2014 16:56:30 +0000
(17:56 +0100)
committer
Jeremy Allison
<jra@samba.org>
Fri, 24 Jan 2014 21:55:47 +0000
(13:55 -0800)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/replace/getaddrinfo.c
patch
|
blob
|
history
diff --git
a/lib/replace/getaddrinfo.c
b/lib/replace/getaddrinfo.c
index c5cd52be93c83b290c0c2724daaddfb77d9ddef6..8440d8e6f3e9d50e292a40b4e69931505ac1b905 100644
(file)
--- 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);
}
}