mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
libreplace: free() deals fine with NULL pointers
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
c6edb37f28
commit
50cc510584
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user