5ed4365cfc
ok william@ (maintainer, also provided an extra patch)
37 lines
899 B
Plaintext
37 lines
899 B
Plaintext
$OpenBSD: patch-sbr_client_c,v 1.1 2012/01/26 07:24:08 bentley Exp $
|
|
|
|
Fix bug 35242
|
|
From http://savannah.nongnu.org/bugs/?35242
|
|
|
|
|
|
--- sbr/client.c.orig Fri Dec 3 19:52:53 2010
|
|
+++ sbr/client.c Tue Jan 10 22:57:51 2012
|
|
@@ -101,7 +101,7 @@ client (char *args, char *service, char *response, int
|
|
|
|
if (connect(sd, ai->ai_addr, ai->ai_addrlen) == 0) {
|
|
freeaddrinfo(res);
|
|
- client_freelist(ap);
|
|
+ client_freelist(arguments);
|
|
return sd;
|
|
}
|
|
|
|
@@ -115,7 +115,7 @@ client (char *args, char *service, char *response, int
|
|
freeaddrinfo(res);
|
|
}
|
|
|
|
- client_freelist(ap);
|
|
+ client_freelist(arguments);
|
|
strncpy (response, "no servers available", len_response);
|
|
return NOTOK;
|
|
}
|
|
@@ -128,8 +128,7 @@ client (char *args, char *service, char *response, int
|
|
static void
|
|
client_freelist(char **list)
|
|
{
|
|
- while (*list++ != NULL)
|
|
- free(*list);
|
|
+ free(*list);
|
|
}
|
|
|
|
|