diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2019-01-25 11:55:54 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2019-01-25 11:55:54 +0200 |
commit | eea77e4b393b7c1841da887f590b5f5eab964ad4 (patch) | |
tree | eb0e955851fbdd85250e12fbfaa5ec390d1088f9 /profile.c | |
parent | 48f4822b0602c44aacd418f36ff35645e8379b8e (diff) | |
parent | fda51ca6fd0d9ad93bead9887ded0b07c90680fb (diff) | |
download | egawk-eea77e4b393b7c1841da887f590b5f5eab964ad4.tar.gz egawk-eea77e4b393b7c1841da887f590b5f5eab964ad4.tar.bz2 egawk-eea77e4b393b7c1841da887f590b5f5eab964ad4.zip |
Merge branch 'feature/fix-ns-memleak'
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2033,6 +2033,8 @@ pp_namespace(const char *name, INSTRUCTION *comment) if (strcmp(current_namespace, name) == 0) return; + // don't need to free current_namespace, it comes from + // info saved in Op_namespace instructions. current_namespace = name; if (do_profile) @@ -2070,7 +2072,8 @@ adjust_namespace(char *name, bool *malloced) // unadorned name from symbol table, add awk:: if not in awk:: n.s. if (strchr(name, ':') == NULL && current_namespace != awk_namespace && // can be equal if namespace never changed - strcmp(current_namespace, "awk") != 0) { + strcmp(current_namespace, "awk") != 0 && + ! is_all_upper(name)) { char *buf; size_t len = 5 + strlen(name) + 1; |