author | Niveditha Rau <Niveditha.Rau@Oracle.COM> |
Tue, 11 Oct 2016 11:08:35 -0700 | |
changeset 7086 | bad5d0bc7457 |
parent 5714 | 02476113ab6b |
permissions | -rw-r--r-- |
5714
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
1 |
This fix was developed inhouse on top of the ksh93 alpha version(2013-10-10-alpha). |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
2 |
This has been submitted to the community but not been accepted yet. |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
3 |
Details can be found at |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
4 |
https://github.com/att/ast/issues/5 |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
5 |
--- INIT.2011-02-08.old/src/cmd/ksh93/sh/macro.c 2015-05-04 13:33:02.298225000 -0700 |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
6 |
+++ INIT.2011-02-08/src/cmd/ksh93/sh/macro.c 2015-06-03 13:20:45.726236100 -0700 |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
7 |
@@ -1195,6 +1195,13 @@ |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
8 |
} |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
9 |
else |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
10 |
v = 0; |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
11 |
+ if(!v && sh_isoption(SH_NOUNSET)) |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
12 |
+ { |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
13 |
+ d=fcget(); |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
14 |
+ fcseek(-1); |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
15 |
+ if(d=='\0' || !strchr(":+-?=",d)) |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
16 |
+ errormsg(SH_DICT,ERROR_exit(1),e_notset,ltos(c)); |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
17 |
+ } |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
18 |
break; |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
19 |
case S_ALP: |
02476113ab6b
22964126 ksh93 memory leak:unset is not properly freeing members of an associative array
Lijo George<lijo.x.george@oracle.com>
parents:
diff
changeset
|
20 |
if(c=='.' && type==0) |