Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jul 2015 16:35:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 201594] usr/src/usr.sbin/pmcstudy/pmcstudy.c:2047: pointless memset ?
Message-ID:  <bug-201594-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201594

            Bug ID: 201594
           Summary: usr/src/usr.sbin/pmcstudy/pmcstudy.c:2047: pointless
                    memset ?
           Product: Base System
           Version: 10.2-BETA1
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: dcb314@hotmail.com

usr/src/usr.sbin/pmcstudy/pmcstudy.c:2047]: (warning) memset() called to fill 0
bytes of 'more'.

           more = malloc(sz);
            if (more == NULL) {
                printf("No memory3 allocation fails at startup?\n");
                exit(-1);
            }
            memset(more, sz, 0);

Suggest use calloc ?

-- 
You are receiving this mail because:
You are the assignee for the bug.



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