aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-07 17:49:16 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-05-07 17:49:16 +0000
commitb4e6ea2c7ce22d99fb4d292d520978ea0971f163 (patch)
tree208599acc632b43bdd913c3825b019fc00c2c81d
parentb08058048ee4d58bf2d34c92a758bb38b079d892 (diff)
downloadpaludis-b4e6ea2c7ce22d99fb4d292d520978ea0971f163.tar.gz
paludis-b4e6ea2c7ce22d99fb4d292d520978ea0971f163.tar.xz
Avoid potential memoryc orruption in Ruby code on exceptions that throw
-rw-r--r--ruby/query.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ruby/query.cc b/ruby/query.cc
index 91eff1e..68ff215 100644
--- a/ruby/query.cc
+++ b/ruby/query.cc
@@ -176,7 +176,7 @@ namespace
VALUE
repository_new(VALUE self, VALUE repository_name)
{
- query::Repository * ptr;
+ query::Repository * ptr(0);
try
{
ptr = new query::Repository(RepositoryName(StringValuePtr(repository_name)));