Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
5f05d02c
Commit
5f05d02c
authored
Jan 06, 2015
by
Niels
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14 from elliotgoodrich/master
Fix double delete on std::bad_alloc exception
parents
a53c878c
0773f40a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/json.cc
src/json.cc
+2
-0
No files found.
src/json.cc
View file @
5f05d02c
...
@@ -1175,6 +1175,7 @@ json::iterator json::find(const char* key)
...
@@ -1175,6 +1175,7 @@ json::iterator json::find(const char* key)
{
{
json
::
iterator
result
(
this
);
json
::
iterator
result
(
this
);
delete
result
.
oi_
;
delete
result
.
oi_
;
result
.
oi_
=
nullptr
;
result
.
oi_
=
new
object_t
::
iterator
(
i
);
result
.
oi_
=
new
object_t
::
iterator
(
i
);
return
result
;
return
result
;
}
}
...
@@ -1198,6 +1199,7 @@ json::const_iterator json::find(const char* key) const
...
@@ -1198,6 +1199,7 @@ json::const_iterator json::find(const char* key) const
{
{
json
::
const_iterator
result
(
this
);
json
::
const_iterator
result
(
this
);
delete
result
.
oi_
;
delete
result
.
oi_
;
result
.
oi_
=
nullptr
;
result
.
oi_
=
new
object_t
::
const_iterator
(
i
);
result
.
oi_
=
new
object_t
::
const_iterator
(
i
);
return
result
;
return
result
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment