VirtualBox

Changeset 37499 in vbox for trunk/src/VBox/Runtime/r3/posix


Ignore:
Timestamp:
Jun 16, 2011 2:46:47 PM (13 years ago)
Author:
vboxsync
Message:

IPRT/RTProcCreateEx: fixed memory leak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/process-creation-posix.cpp

    r37448 r37499  
    106106    struct crypt_data *data = (struct crypt_data*)RTMemTmpAllocZ(sizeof(*data));
    107107    char *pszEncPasswd = crypt_r(pszPasswd, pw->pw_passwd, data);
    108     if (strcmp(pszEncPasswd, pw->pw_passwd))
     108    int fCorrect = !strcmp(pszEncPasswd, pw->pw_passwd);
     109    RTMemTmpFree(data);
     110    if (!fCorrect)
    109111        return VERR_PERMISSION_DENIED;
    110     RTMemTmpFree(data);
    111112
    112113    *gid = pw->pw_gid;
Note: See TracChangeset for help on using the changeset viewer.

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