IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 12, 2005, 1:07:37 PM (21 years ago)
Author:
eugene
Message:

cleaning up memory leaks

File:
1 edited

Legend:

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

    r2598 r3907  
    4646    AddCommand (cmd);
    4747    free (cmd);
    48 
    4948    macro = NewMacro (argv[1]);
    5049  } else { /**** Old Macro ****/
     
    5857  NLINES = D_NLINES;
    5958  for (i = 0; i < macro[0].Nlines; i++) free (macro[0].line[i]);
    60   ALLOCATE (macro[0].line, char *, NLINES);
     59  REALLOCATE (macro[0].line, char *, NLINES);
    6160
    6261  /* read in macro
     
    7978      continue;
    8079    }
     80    if (ThisList == 0) ohana_memregister (input);
    8181
    8282    if ((ThisList > 0) && (input == (char *) NULL)) {
     
    9696        free (input);
    9797        macro[0].Nlines = i;
    98         if (macro[0].Nlines == 0)
    99           i = 1;
     98        if (macro[0].Nlines == 0) i = 1;
    10099        REALLOCATE (macro[0].line, char *, i);
    101100        return (TRUE);
Note: See TracChangeset for help on using the changeset viewer.