artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ae11a2
)
do not call freeaddrinfo() on a NULL pointer.
author
eric
<eric@openbsd.org>
Sat, 6 Apr 2019 10:35:48 +0000
(10:35 +0000)
committer
eric
<eric@openbsd.org>
Sat, 6 Apr 2019 10:35:48 +0000
(10:35 +0000)
usr.sbin/lpd/resolver.c
patch
|
blob
|
history
diff --git
a/usr.sbin/lpd/resolver.c
b/usr.sbin/lpd/resolver.c
index
5b73e29
..
059a103
100644
(file)
--- a/
usr.sbin/lpd/resolver.c
+++ b/
usr.sbin/lpd/resolver.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: resolver.c,v 1.
3 2019/04/04 19:25:46
eric Exp $ */
+/* $OpenBSD: resolver.c,v 1.
4 2019/04/06 10:35:48
eric Exp $ */
/*
* Copyright (c) 2017-2018 Eric Faurot <eric@openbsd.org>
@@
-326,7
+326,8
@@
resolver_getaddrinfo_cb(struct asr_result *ar, void *arg)
m_add_int(s->proc, ar->ar_errno);
m_close(s->proc);
- freeaddrinfo(ar->ar_addrinfo);
+ if (ar->ar_addrinfo)
+ freeaddrinfo(ar->ar_addrinfo);
free(s);
}