Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jun 2013 23:48:14 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r251560 - head/usr.sbin/pkg
Message-ID:  <201306082348.r58NmEtZ062171@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sat Jun  8 23:48:13 2013
New Revision: 251560
URL: http://svnweb.freebsd.org/changeset/base/251560

Log:
  Fix a bad calloc(3) call
  
  MFC after:	2 weeks

Modified:
  head/usr.sbin/pkg/dns_utils.c

Modified: head/usr.sbin/pkg/dns_utils.c
==============================================================================
--- head/usr.sbin/pkg/dns_utils.c	Sat Jun  8 23:45:11 2013	(r251559)
+++ head/usr.sbin/pkg/dns_utils.c	Sat Jun  8 23:48:13 2013	(r251560)
@@ -66,7 +66,7 @@ dns_getsrvinfo(const char *zone)
 		p += len + NS_QFIXEDSZ;
 	}
 
-	res = calloc(ancount, sizeof(struct dns_srvinfo));
+	res = calloc(ancount, sizeof(struct dns_srvinfo *));
 	if (res == NULL)
 		return (NULL);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306082348.r58NmEtZ062171>