IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 12, 2005, 10:09:10 PM (21 years ago)
Author:
eugene
Message:

cleaned up memory leaks

File:
1 edited

Legend:

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

    r2792 r3922  
    1919  if (L == NULL) {
    2020    free (newline);
     21    free (tmpline);
    2122    return (line);
    2223  }
     
    4546      if (val == NULL) goto dumpline; /* not a valid vector subscript */
    4647    }
     48    I = atoi (val);
     49    free (val);
     50
    4751    /* find vector name */
    4852    for (w = p - 1; (w >= line) && !whitespace(*w) && (isalnum(*w) || (*w == ':') || (*w == '_')); w--);
     
    5155    strncpy (tmpline, w, n);
    5256    tmpline[n] = 0;
    53     if ((vec = SelectVector (tmpline, OLDVECTOR, TRUE)) == NULL) {
    54       free (val);
    55       goto dumpline;
    56     }
     57    if ((vec = SelectVector (tmpline, OLDVECTOR, TRUE)) == NULL) goto dumpline;
     58
    5759    /* find vector element */
    58     I = atoi (val);
    59     free (val);
    6060    if (I >= vec[0].Nelements) {
    6161      fprintf (stderr, "vector subscript out of range\n");
Note: See TracChangeset for help on using the changeset viewer.