Skip to content

Commit

Permalink
bsock: replaced NULL with nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
franku committed Sep 20, 2018
1 parent c108b57 commit 65a742e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions core/src/lib/bsock_tcp.cc
Expand Up @@ -932,25 +932,23 @@ void BareosSocketTCP::destroy()
{
if (msg) {
FreePoolMemory(msg);
msg = NULL;
} else {
ASSERT(1 == 0); /* double close */
msg = nullptr;
}
if (errmsg) {
FreePoolMemory(errmsg);
errmsg = NULL;
errmsg = nullptr;
}
if (who_) {
free(who_);
who_ = NULL;
who_ = nullptr;
}
if (host_) {
free(host_);
host_ = NULL;
host_ = nullptr;
}
if (src_addr) {
free(src_addr);
src_addr = NULL;
src_addr = nullptr;
}
if (fd_ >= 0) {
socketClose(fd_);
Expand All @@ -962,6 +960,7 @@ void BareosSocketTCP::destroy()
}
if(src_addr) {
delete (src_addr);
src_addr = nullptr;
}
}

Expand Down

0 comments on commit 65a742e

Please sign in to comment.