VirtualBox

Changeset 3570 in kBuild


Ignore:
Timestamp:
Jul 9, 2022 2:42:02 PM (3 years ago)
Author:
bird
Message:

kash: Must NULL nextc when freeing an output buffer.

Location:
trunk/src/kash
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/generated/init.c

    r3459 r3570  
    204204                      ckfree(psh, psh->memout.buf);
    205205                      psh->memout.buf = NULL;
     206                      psh->memout.nextc = NULL;
    206207              }
    207208      }
  • trunk/src/kash/output.c

    r3438 r3570  
    9191                ckfree(psh, psh->memout.buf);
    9292                psh->memout.buf = NULL;
     93                psh->memout.nextc = NULL;
    9394        }
    9495}
     
    200201                ckfree(psh, psh->output.buf);
    201202                psh->output.buf = NULL;
     203                psh->output.nextc = NULL;
    202204                psh->output.nleft = 0;
    203205        }
  • trunk/src/kash/shinstance.c

    r3569 r3570  
    429429
    430430    /* output.h */
    431         if (psh->output.buf != NULL)
     431    if (psh->output.buf != NULL)
    432432    {
    433433        ckfree(psh, psh->output.buf);
    434434        psh->output.buf = NULL;
    435         }
    436         if (psh->errout.buf != NULL)
     435    }
     436    if (psh->errout.buf != NULL)
    437437    {
    438438        ckfree(psh, psh->errout.buf);
    439439        psh->errout.buf = NULL;
    440         }
    441         if (psh->memout.buf != NULL)
     440    }
     441    if (psh->memout.buf != NULL)
    442442    {
    443443        ckfree(psh, psh->memout.buf);
    444444        psh->memout.buf = NULL;
    445         }
     445    }
    446446
    447447    /* options.h */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette