-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed several issues reported by PVS Studio static analyzer
- Loading branch information
Showing
3 changed files
with
16 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* Copyright (C) 2020 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2020 Vladimir Sadovnikov <[email protected]> | ||
* Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> | ||
* (C) 2023 Vladimir Sadovnikov <[email protected]> | ||
* | ||
* This file is part of lsp-common-lib | ||
* Created on: 7 апр. 2020 г. | ||
|
@@ -357,6 +357,9 @@ namespace lsp | |
|
||
log_string & log_string::operator = (const log_string & src) | ||
{ | ||
if (this == &src) | ||
return *this; | ||
|
||
if (text != NULL) | ||
free(text); | ||
text = (src.text != NULL) ? strdup(src.text) : NULL; | ||
|
@@ -365,6 +368,9 @@ namespace lsp | |
|
||
log_string & log_string::operator = (log_string && src) | ||
{ | ||
if (this == &src) | ||
return *this; | ||
|
||
if (text != NULL) | ||
free(text); | ||
text = src.text; | ||
|