aboutsummaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2019-01-18 14:39:08 +0200
committerArnold D. Robbins <arnold@skeeve.com>2019-01-18 14:39:08 +0200
commitc25c7d9359451ec91c4290a84b17185fa32f167f (patch)
treeeab754306affe4bbc2d427cbd4bc8f837499a75e /profile.c
parent6f16c4f468e6f3a6769509e1e70ff2dc4873e8d2 (diff)
downloadegawk-c25c7d9359451ec91c4290a84b17185fa32f167f.tar.gz
egawk-c25c7d9359451ec91c4290a84b17185fa32f167f.tar.bz2
egawk-c25c7d9359451ec91c4290a84b17185fa32f167f.zip
Start fixing memory leaks in namespace management.
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/profile.c b/profile.c
index 3d954d30..e44f8be8 100644
--- a/profile.c
+++ b/profile.c
@@ -2033,6 +2033,8 @@ pp_namespace(const char *name, INSTRUCTION *comment)
if (strcmp(current_namespace, name) == 0)
return;
+ if (current_namespace != awk_namespace)
+ efree((void *) current_namespace);
current_namespace = name;
if (do_profile)