IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16464


Ignore:
Timestamp:
Feb 13, 2008, 4:27:58 PM (18 years ago)
Author:
eugene
Message:

fixed a leak & seg fault

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.basic/run_for.c

    r14178 r16464  
    3838
    3939    /* check for end-of-data syntax error */
    40     if (input == (char *) NULL) {
     40    if (input == NULL) {
    4141      if (ThisList == 0)  {
    4242        gprint (GP_ERR, "end loop with 'END'\n");
     
    5959    if (!strncasecmp (input, "END", 3)) {
    6060      depth --;
    61       if (depth < 0) break;
     61      if (depth < 0) {
     62        free (input);
     63        break;
     64      }
    6265    }
    6366
     
    7477
    7578  /* cleanup loop data */
    76   free (input);
    7779  loop.Nlines = i;
    7880  REALLOCATE (loop.line, char *, MAX (loop.Nlines, 1));
Note: See TracChangeset for help on using the changeset viewer.