Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
- set pointers to 0 after delete to have reliable errors
  • Loading branch information
aschnell committed Jul 23, 2018
commit 4434ecb84eea12f553b495e6004a44b93fdd3303
1 change: 1 addition & 0 deletions server/Client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Client::delete_comparison(list<Comparison*>::iterator it)
}

delete *it;
*it = nullptr;
}


Expand Down
4 changes: 3 additions & 1 deletion server/MetaSnapper.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (c) [2012-2015] Novell, Inc.
* Copyright (c) 2018 SUSE LLC
*
* All Rights Reserved.
*
Expand Down Expand Up @@ -103,6 +104,7 @@ MetaSnapper::MetaSnapper(ConfigInfo& config_info)
MetaSnapper::~MetaSnapper()
{
delete snapper;
snapper = nullptr;
}


Expand Down Expand Up @@ -172,7 +174,7 @@ void
MetaSnapper::unload()
{
delete snapper;
snapper = NULL;
snapper = nullptr;
}


Expand Down
1 change: 1 addition & 0 deletions snapper/Log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ namespace snapper
{
callLogDo(level, *component, file, line, func, stream->str());
delete stream;
stream = nullptr;
}

}
5 changes: 4 additions & 1 deletion snapper/Snapper.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) [2011-2015] Novell, Inc.
* Copyright (c) 2016 SUSE LLC
* Copyright (c) [2016,2018] SUSE LLC
*
* All Rights Reserved.
*
Expand Down Expand Up @@ -147,7 +147,10 @@ namespace snapper
}

delete filesystem;
filesystem = nullptr;

delete config_info;
config_info = nullptr;
}


Expand Down