VirtualBox

Changeset 56747 in vbox for trunk/src/VBox/Runtime/r3


Ignore:
Timestamp:
Jul 2, 2015 11:18:15 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
101393
Message:

Fix two small memory leaks found by Parfait

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/isofs.cpp

    r56290 r56747  
    335335
    336336                char *pszName = RTStrAlloc(pCurRecord->name_len + 1);
    337                 AssertPtr(pszName);
     337                if (RT_UNLIKELY(!pszName))
     338                {
     339                    rc = VERR_NO_STR_MEMORY;
     340                    break;
     341                }
     342
    338343                Assert(idx + sizeof(RTISOFSDIRRECORD) < cbRead);
    339344                memcpy(pszName, &abBuffer[idx + sizeof(RTISOFSDIRRECORD)], pCurRecord->name_len);
     
    385390                }
    386391                idx += pCurRecord->record_length;
     392                RTStrFree(pszName);
    387393            }
    388394        }
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