VirtualBox

Changeset 50982 in vbox for trunk/src/VBox/Devices/VMMDev


Ignore:
Timestamp:
Apr 7, 2014 9:47:28 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
93159
Message:

VMMDevHGCM: RTMemAllocZ instead of memset.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp

    r50891 r50982  
    806806    }
    807807
    808     PVBOXHGCMCMD pCmd = (PVBOXHGCMCMD)RTMemAlloc (cbCmdSize);
     808    PVBOXHGCMCMD pCmd = (PVBOXHGCMCMD)RTMemAllocZ(cbCmdSize);
    809809
    810810    if (pCmd == NULL)
     
    812812        return VERR_NO_MEMORY;
    813813    }
    814 
    815     memset (pCmd, 0, sizeof (*pCmd));
    816814
    817815    pCmd->paHostParms = NULL;
     
    821819    if (cLinPtrs > 0)
    822820    {
    823         pCmd->paLinPtrs = (VBOXHGCMLINPTR *)RTMemAlloc (  sizeof (VBOXHGCMLINPTR) * cLinPtrs
    824                                                           + sizeof (RTGCPHYS) * cLinPtrPages);
     821        pCmd->paLinPtrs = (VBOXHGCMLINPTR *)RTMemAllocZ(  sizeof (VBOXHGCMLINPTR) * cLinPtrs
     822                                                        + sizeof (RTGCPHYS) * cLinPtrPages);
    825823
    826824        if (pCmd->paLinPtrs == NULL)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette