VirtualBox

Changeset 86418 in vbox for trunk


Ignore:
Timestamp:
Oct 2, 2020 11:55:28 AM (4 years ago)
Author:
vboxsync
Message:

xpcom/TestHashTables: Fixed use-after-free issue in IFoo::Release(). bugref:9841

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/tests/TestHashtables.cpp

    r86417 r86418  
    290290      printf(">>");
    291291     
    292     nsrefcnt = --refcount_;
     292    nsrefcnt newrefcount = --refcount_;
    293293    printf("IFoo@%p::Release(), refcount --> %d\n",
    294294           NS_STATIC_CAST(void*, this), nsrefcnt);
    295295
    296     if ( !nsrefcnt )
     296    if ( !newrefcount )
    297297      {
    298298        printf("  delete IFoo@%p\n", NS_STATIC_CAST(void*, this));
     
    303303      printf("  delete IFoo@%p\n", NS_STATIC_CAST(void*, this));
    304304
    305     return nsrefcnt;
     305    return newrefcount;
    306306  }
    307307
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