Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
7b6474a7
Commit
7b6474a7
authored
4 years ago
by
Brian Carrier
Browse files
Options
Downloads
Patches
Plain Diff
Added comments about who is free for freeing return value
parent
5debd1a8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rejistry++/src/RegistryKey.cpp
+15
-0
15 additions, 0 deletions
rejistry++/src/RegistryKey.cpp
with
15 additions
and
0 deletions
rejistry++/src/RegistryKey.cpp
+
15
−
0
View file @
7b6474a7
...
...
@@ -58,6 +58,9 @@ namespace Rejistry {
return
_nk
->
getName
();
}
/**
* Caller is responsible for freeing the key
*/
RegistryKey
::
RegistryKeyPtr
RegistryKey
::
getParent
()
const
{
if
(
!
_nk
->
hasParentRecord
())
{
throw
NoSuchElementException
(
"Registry Key has no parent."
);
...
...
@@ -66,6 +69,9 @@ namespace Rejistry {
return
new
RegistryKey
(
_nk
->
getParentRecord
());
}
/**
* Caller is responsible for freeing the keys in the list
*/
RegistryKey
::
RegistryKeyPtrList
RegistryKey
::
getSubkeyList
()
const
{
std
::
vector
<
RegistryKey
*>
subkeys
;
NKRecord
::
NKRecordPtrList
nkRecordList
=
_nk
->
getSubkeyList
()
->
getSubkeys
();
...
...
@@ -76,10 +82,16 @@ namespace Rejistry {
return
subkeys
;
}
/**
* Caller is responsible for freeing returned key
*/
RegistryKey
::
RegistryKeyPtr
RegistryKey
::
getSubkey
(
const
std
::
wstring
&
name
)
const
{
return
new
RegistryKey
(
_nk
->
getSubkeyList
()
->
getSubkey
(
name
));
}
/**
* Caller is responsible for freeing the values in the list
*/
RegistryValue
::
RegistryValuePtrList
RegistryKey
::
getValueList
()
const
{
RegistryValue
::
RegistryValuePtrList
values
;
VKRecord
::
VKRecordPtrList
vkRecordList
=
_nk
->
getValueList
()
->
getValues
();
...
...
@@ -90,6 +102,9 @@ namespace Rejistry {
return
values
;
}
/**
* Caller is responsible for freeing returned value
*/
RegistryValue
::
RegistryValuePtr
RegistryKey
::
getValue
(
const
std
::
wstring
&
name
)
const
{
return
new
RegistryValue
(
_nk
->
getValueList
()
->
getValue
(
name
));
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment