Ticket #9166: container_leak.patch

File container_leak.patch, 559 bytes (added by onlyone@…, 9 years ago)

Patch that disables allocation when space for 0 elements is needed.

  • boost/container/detail/allocator_version_traits.hpp

    old new  
    141141      else{
    142142         received_size = preferred_size;
    143143         BOOST_TRY{
    144             ret.first = a.allocate(received_size);
     144            if(preferred_size){
     145               ret.first = a.allocate(received_size);
     146            }
    145147         }
    146148         BOOST_CATCH(...){
    147149            if(!(command & nothrow_allocation)){