Skip to content

fixed from PVS-Studio - #13

Open
ip-gpu wants to merge 1 commit into
Cisco-Talos:masterfrom
ip-gpu:PVS_fixes
Open

fixed from PVS-Studio#13
ip-gpu wants to merge 1 commit into
Cisco-Talos:masterfrom
ip-gpu:PVS_fixes

Conversation

@ip-gpu

@ip-gpu ip-gpu commented Oct 30, 2017

Copy link
Copy Markdown

I'm a member of the Pinguem.ru competition on finding errors in open source projects. A bug, found using PVS-Studio. Warnings:

V611 The memory was allocated using 'new T[]' operator but was released using the 'delete' operator. Consider inspecting this code. It's probably better to use 'delete [] modFileName;'. log.cpp 374
V611 The memory was allocated using 'new T[]' operator but was released using the 'delete' operator. Consider inspecting this code. It's probably better to use 'delete [] modFileName;'. log.cpp 379
V611 The memory was allocated using 'new T[]' operator but was released using the 'delete' operator. Consider inspecting this code. It's probably better to use 'delete [] buff;'. log.cpp 416
V611 The memory was allocated using 'new T[]' operator but was released using the 'delete' operator. Consider inspecting this code. It's probably better to use 'delete [] searchPath;'. stdafx.cpp 108
V611 The memory was allocated using 'new T[]' operator but was released using the 'delete' operator. Consider inspecting this code. It's probably better to use 'delete [] searchPath;'. stdafx.cpp 120
V668 There is no sense in testing the 'buff' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. log.cpp 416

V611 The memory was allocated using 'new T[]' operator but was released using the 'delete' operator. Consider inspecting this code. It's probably better to use 'delete [] modFileName;'. log.cpp 374
V611 The memory was allocated using 'new T[]' operator but was released using the 'delete' operator. Consider inspecting this code. It's probably better to use 'delete [] modFileName;'. log.cpp 379
V611 The memory was allocated using 'new T[]' operator but was released using the 'delete' operator. Consider inspecting this code. It's probably better to use 'delete [] buff;'. log.cpp 416
V611 The memory was allocated using 'new T[]' operator but was released using the 'delete' operator. Consider inspecting this code. It's probably better to use 'delete [] searchPath;'. stdafx.cpp 108
V611 The memory was allocated using 'new T[]' operator but was released using the 'delete' operator. Consider inspecting this code. It's probably better to use 'delete [] searchPath;'. stdafx.cpp 120
V668 There is no sense in testing the 'buff' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error. log.cpp 416
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant