Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
656a173
)
THRIFT-2017 Resource Leak in thrift struct under compiler/cpp/src/parse/t_program.h
author
Jens Geyer
<jensg@apache.org>
Sun, 4 Aug 2013 11:39:09 +0000
(13:39 +0200)
committer
Jens Geyer
<jensg@apache.org>
Sun, 4 Aug 2013 11:39:09 +0000
(13:39 +0200)
Patch: kuldeep gupta
compiler/cpp/src/parse/t_program.h
patch
|
blob
|
history
diff --git
a/compiler/cpp/src/parse/t_program.h
b/compiler/cpp/src/parse/t_program.h
index
f22da07
..
96a8a5c
100644
(file)
--- a/
compiler/cpp/src/parse/t_program.h
+++ b/
compiler/cpp/src/parse/t_program.h
@@
-73,6
+73,15
@@
class t_program : public t_doc {
scope_ = new t_scope();
}
+ ~t_program()
+ {
+ if(scope_)
+ {
+ delete scope_;
+ scope_ = NULL;
+ }
+ }
+
// Path accessor
const std::string& get_path() const { return path_; }