git://developer.intra2net.com
/
libt2n
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
libt2n: (tomj) fix uninitialized variable "result_type" in result_container
[libt2n]
/
src
/
container.cpp
diff --git
a/src/container.cpp
b/src/container.cpp
index
47d0e49
..
0401af8
100644
(file)
--- a/
src/container.cpp
+++ b/
src/container.cpp
@@
-40,6
+40,9
@@
result_container::~result_container()
delete res;
if (ex)
delete ex;
+
+ res = NULL;
+ ex = NULL;
}
/** @brief returns the result or throw the carried exception.
@@
-49,6
+52,7
@@
result* result_container::get_result(void)
{
if (result_type==exception)
ex->do_throw();
+
return res;
}
@@
-57,6
+61,8
@@
command_container::~command_container()
{
if (cmd)
delete cmd;
+
+ cmd = NULL;
}
} // namespace libt2n