IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 12, 2025, 4:47:51 PM (6 months ago)
Author:
eugene
Message:

free memory on exit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.shell/command.c

    r30614 r42938  
    3636  /* solve math expresions, assign variable, if needed.  any entry in line of the form {foo}
    3737   * returns value or tmp vector / buffer */
    38   line = parse (&status, line);        /* line is freed here, new one allocated */
     38  line = parse (&status, line);
     39  /* NOTE: line is freed here, new one allocated.  This is NOT freed by the 'quit' command */
    3940  if (!status) goto escape;
    4041
     
    4243  *outline = line;
    4344 
     45  // this value is not freed by 'quit' (called as command below)
    4446  argv = parse_commands (line, &argc);
    4547  if (argc == 0) {
     
    5052
    5153  /* save the original values of argv since command may modify the array */
     54  // this value is not freed by 'quit' (called as command below)
    5255  ALLOCATE (targv, char *, argc);
    5356  for (i = 0; i < argc; i++) targv[i] = argv[i];
Note: See TracChangeset for help on using the changeset viewer.