[svn] GnuPG - r4978 - branches/STABLE-BRANCH-1-4/util

svn author dshaw cvs at cvs.gnupg.org
Fri Apr 3 05:38:59 CEST 2009


Author: dshaw
Date: 2009-04-03 05:38:59 +0200 (Fri, 03 Apr 2009)
New Revision: 4978

Modified:
   branches/STABLE-BRANCH-1-4/util/ChangeLog
   branches/STABLE-BRANCH-1-4/util/http.c
Log:
* http.c (connect_server): free (rather than xfree) the result of
getsrv().


Modified: branches/STABLE-BRANCH-1-4/util/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/util/ChangeLog	2009-04-03 03:33:57 UTC (rev 4977)
+++ branches/STABLE-BRANCH-1-4/util/ChangeLog	2009-04-03 03:38:59 UTC (rev 4978)
@@ -1,5 +1,8 @@
 2009-04-02  David Shaw  <dshaw at 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

Modified: branches/STABLE-BRANCH-1-4/util/http.c
===================================================================
--- branches/STABLE-BRANCH-1-4/util/http.c	2009-04-03 03:33:57 UTC (rev 4977)
+++ branches/STABLE-BRANCH-1-4/util/http.c	2009-04-03 03:38:59 UTC (rev 4978)
@@ -856,7 +856,9 @@
     {
       /* 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 @@
     }
 #endif /* !HAVE_GETADDRINFO */
 
-  xfree(srvlist);
+  free(srvlist);
 
   if(!connected)
     {




More information about the Gnupg-commits mailing list