1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-02-01 16:33:02 +01:00

* http.c (connect_server): free (rather than xfree) the result of

getsrv().
This commit is contained in:
David Shaw 2009-04-03 03:38:59 +00:00
parent 0f8b0fc195
commit a5b708ba9c
2 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2009-04-02 David Shaw <dshaw@jabberwocky.com>
* http.c (connect_server): free (rather than xfree) the result of
getsrv().
* Makefile.am: Make srv.c part of libcompat instead of libutil.
* srv.c (getsrv): Raise maximum packet size to 2048, as PACKETSZ

View File

@ -856,7 +856,9 @@ connect_server( const char *server, ushort port, unsigned int flags,
{
/* Either we're not using SRV, or the SRV lookup failed. Make
up a fake SRV record. */
srvlist=xmalloc_clear(sizeof(struct srventry));
srvlist=calloc(1,sizeof(struct srventry));
if(!srvlist)
return -1;
srvlist->port=port;
strncpy(srvlist->target,server,MAXDNAME);
srvlist->target[MAXDNAME-1]='\0';
@ -959,7 +961,7 @@ connect_server( const char *server, ushort port, unsigned int flags,
}
#endif /* !HAVE_GETADDRINFO */
xfree(srvlist);
free(srvlist);
if(!connected)
{