svn commit: r218938 - head/tools/regression/aio/kqueue

Garrett Cooper gcooper at FreeBSD.org
Thu Feb 24 23:11:49 UTC 2011


On Thu, Feb 24, 2011 at 2:43 PM, Stanislav Sedov <stas at freebsd.org> wrote:
> On Tue, 22 Feb 2011 05:13:27 +0000 (UTC)
> Martin Wilke <miwi at 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:
>>   - 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] = (struct aiocb *)calloc(1,
+                           sizeof(struct aiocb));
+                       if (iocb[i] == NULL)
+                               err(1, "calloc");

Memory leaks:

+               for (i = 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


More information about the svn-src-head mailing list