aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-02-18 14:42:02 +0530
committerGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-02-18 14:42:02 +0530
commitaad6e5648b0d171a93d57c5a6b7cdb38d42dd70e (patch)
treed312d186fb503c169a0363c23bfa2077f616eda0
parent8f1423946fd3ab9d5bca168de7fb12b9c397b034 (diff)
Fix for properly removing universal variable.
-rw-r--r--env.cpp3
-rw-r--r--env_universal_common.cpp1
2 files changed, 2 insertions, 2 deletions
diff --git a/env.cpp b/env.cpp
index b90e3d6d..936729b9 100644
--- a/env.cpp
+++ b/env.cpp
@@ -693,7 +693,7 @@ void env_destroy()
{
has_changed = 1;
}
-
+
delete entry;
}
@@ -1454,7 +1454,6 @@ void env_pop()
{
has_changed = 1;
}
-
delete entry;
}
diff --git a/env_universal_common.cpp b/env_universal_common.cpp
index 9628b630..deb4fc5b 100644
--- a/env_universal_common.cpp
+++ b/env_universal_common.cpp
@@ -522,6 +522,7 @@ void env_universal_common_remove( const wcstring &name )
if (result != env_universal_var.end())
{
var_uni_entry_t* v = result->second;
+ env_universal_var.erase(result);
delete v;
}
}