Skip to content

Commit e20db01

Browse files
committed
Apply Solaris patch 065-CR7110983
This change is pulled from here: https://github.com/oracle/solaris-userland/blob/master/components/ksh93/patches/065-CR7110983.patch Unfortunately there is no publicly available documentation on what it does. We just have to assume the Solaris people knew what they were doing. It looks like this fixes a memory leak in nv_putval(). This patch was also applied by ksh2020: att@0563864
1 parent 222515b commit e20db01

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/cmd/ksh93/sh/name.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,7 +1888,10 @@ void nv_putval(register Namval_t *np, const char *string, int flags)
18881888
else
18891889
{
18901890
if(size==0 && nv_isattr(np,NV_HOST)!=NV_HOST &&nv_isattr(np,NV_LJUST|NV_RJUST|NV_ZFILL))
1891+
{
18911892
nv_setsize(np,size=dot);
1893+
tofree = up->cp;
1894+
}
18921895
else if(size > dot)
18931896
dot = size;
18941897
else if(nv_isattr(np,NV_LJUST|NV_RJUST)==NV_LJUST && dot>size)

0 commit comments

Comments
 (0)