Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Feb 2011 15:11:46 -0800
From:      Garrett Cooper <gcooper@FreeBSD.org>
To:        Stanislav Sedov <stas@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, rwatson@freebsd.org, Martin Wilke <miwi@freebsd.org>
Subject:   Re: svn commit: r218938 - head/tools/regression/aio/kqueue
Message-ID:  <AANLkTinjgNEPN5tBHCL1q_xgkCobFXhttV0DqMRty7HV@mail.gmail.com>
In-Reply-To: <20110224144303.baa6e809.stas@FreeBSD.org>
References:  <201102220513.p1M5DRrQ095042@svn.freebsd.org> <20110224144303.baa6e809.stas@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 24, 2011 at 2:43 PM, Stanislav Sedov <stas@freebsd.org> wrote:
> On Tue, 22 Feb 2011 05:13:27 +0000 (UTC)
> Martin Wilke <miwi@FreeBSD.org> mentioned:
>
>> Author: miwi
>> Date: Tue Feb 22 05:13:26 2011
>> New Revision: 218938
>> URL: http://svn.freebsd.org/changeset/base/218938
>>
>> Log:
>> =A0 - Fix QA issues
>>
>
> What kind these QA issues are of?

Stupid me. This was wrong:

-       char *file, pathname[sizeof(PATH_TEMPLATE)-1];
+       char *file, pathname[sizeof(PATH_TEMPLATE)+1];

(sizeof will return the buffer size -- the above item was true if I
was using strlen)

NULL pointer derefs:

+                       iocb[i] =3D (struct aiocb *)calloc(1,
+                           sizeof(struct aiocb));
+                       if (iocb[i] =3D=3D NULL)
+                               err(1, "calloc");

Memory leaks:

+               for (i =3D 0; i < MAX; i++)
+                       free(iocb[i]);
+

> Also, style(9) does not encourage extra bland lines for now reason.

    Sorry .. the blank lines for my mistake :(...
Thanks,
-Garrett



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