Ticket #6166: 0001-Don-t-double-free-the-Ethernet-interface.patch

File 0001-Don-t-double-free-the-Ethernet-interface.patch, 895 bytes (added by andreasf, 14 years ago)

proposed patch: don't double-free the Ethernet interface

  • src/system/boot/loader/net/Ethernet.cpp

    From 10a3cf1ef9772d9590e0800e866835972c7ad796 Mon Sep 17 00:00:00 2001
    From: Andreas Faerber <andreas.faerber@web.de>
    Date: Sun, 13 Jun 2010 16:44:09 +0200
    Subject: [PATCH 1/3] Don't double-free the Ethernet interface
    
    It is currently done in both ~EthernetService() and ~NetStack().
    
    Since NetStack is where it's added and where an explicit accessor function is provided,
    choose that location.
    ---
     src/system/boot/loader/net/Ethernet.cpp |    2 --
     1 files changed, 0 insertions(+), 2 deletions(-)
    
    diff --git a/src/system/boot/loader/net/Ethernet.cpp b/src/system/boot/loader/net/Ethernet.cpp
    index 6e16756..e2724bc 100644
    a b EthernetService::~EthernetService()  
    7777{
    7878    if (fSendBuffer)
    7979        fInterface->FreeSendReceiveBuffer(fSendBuffer);
    80 
    81     delete fInterface;
    8280}
    8381
    8482// Init