projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7571b40
)
Fix uninit-var bug in tcpip_straddr.
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 3 Dec 2009 12:36:29 +0000
(13:36 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 3 Dec 2009 12:41:02 +0000
(13:41 +0100)
A local variable ai was uninitialized in the case of getaddrinfo
failing. It is not set to 0 (NULL) as it should. This bug was
introduced in YAZ 3.0.51 when a leak for getaddrinfo resources
was fixed.
src/tcpip.c
patch
|
blob
|
history
diff --git
a/src/tcpip.c
b/src/tcpip.c
index
50c0622
..
cb2883c
100644
(file)
--- a/
src/tcpip.c
+++ b/
src/tcpip.c
@@
-423,7
+423,7
@@
void *tcpip_straddr(COMSTACK h, const char *str)
{
tcpip_state *sp = (tcpip_state *)h->cprivate;
const char *port = "210";
- struct addrinfo *ai;
+ struct addrinfo *ai = 0;
if (h->protocol == PROTO_HTTP)
port = "80";
if (!tcpip_init())