Ticket #10220: 0001-Added-virtual-destructor-to-DoublyLinkedListImpl-Pac.patch

File 0001-Added-virtual-destructor-to-DoublyLinkedListImpl-Pac.patch, 1.5 KB (added by Ezodev, 11 years ago)

patch

  • headers/private/kernel/util/DoublyLinkedList.h

    From 32e07f418b48d42856f0e8c08b26ee3bd2d8b321 Mon Sep 17 00:00:00 2001
    From: Ezo <ezo.dev@gmail.com>
    Date: Mon, 18 Nov 2013 20:23:13 +0000
    Subject: [PATCH] Added virtual destructor to DoublyLinkedListImpl,
     PackageSymlink and PackageDirectory
    
    ---
     headers/private/kernel/util/DoublyLinkedList.h              | 3 ++-
     src/system/boot/loader/file_systems/packagefs/packagefs.cpp | 4 ++--
     2 files changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/headers/private/kernel/util/DoublyLinkedList.h b/headers/private/kernel/util/DoublyLinkedList.h
    index 2321689..a09cfcc 100644
    a b public:  
    4141        { return &fDoublyLinkedListLink; }
    4242    const DLL_Link* GetDoublyLinkedListLink() const
    4343        { return &fDoublyLinkedListLink; }
    44 
     44    virtual ~DoublyLinkedListLinkImpl() {}
     45   
    4546private:
    4647    DLL_Link    fDoublyLinkedListLink;
    4748};
  • src/system/boot/loader/file_systems/packagefs/packagefs.cpp

    diff --git a/src/system/boot/loader/file_systems/packagefs/packagefs.cpp b/src/system/boot/loader/file_systems/packagefs/packagefs.cpp
    index 1ab70be..33eb726 100644
    a b struct PackageSymlink : PackageNode {  
    163163    {
    164164    }
    165165
    166     ~PackageSymlink()
     166    virtual ~PackageSymlink()
    167167    {
    168168        free(fPath);
    169169    }
    struct PackageDirectory : PackageNode {  
    194194    {
    195195    }
    196196
    197     ~PackageDirectory()
     197    virtual ~PackageDirectory()
    198198    {
    199199        while (PackageNode* node = fEntries.RemoveHead())
    200200            delete node;