Browse Source

plug small memory leaks

pre-master-46
Holger Vogt 8 years ago
parent
commit
6ed10583f2
  1. 5
      src/frontend/inpcom.c

5
src/frontend/inpcom.c

@ -6663,8 +6663,10 @@ inp_meas_current(struct card *deck)
where i(xyz) has been found */ where i(xyz) has been found */
tok = gettok(&curr_line); tok = gettok(&curr_line);
/* done when end of subcircuit is reached */ /* done when end of subcircuit is reached */
if (eq(".ends", tok) && rep->s_start)
if (eq(".ends", tok) && rep->s_start) {
tfree(tok);
break; break;
}
if (eq(rep->rtoken, tok)) { if (eq(rep->rtoken, tok)) {
/* special treatment if we have an e (VCVS) or h (CCVS) source: /* special treatment if we have an e (VCVS) or h (CCVS) source:
check if it is a simple linear source, if yes, don't do a check if it is a simple linear source, if yes, don't do a
@ -6682,6 +6684,7 @@ inp_meas_current(struct card *deck)
printf("i(%s) moved back to i(%s) in\n%s\n\n", searchstr, tok, rep->cline->line); printf("i(%s) moved back to i(%s) in\n%s\n\n", searchstr, tok, rep->cline->line);
} }
tfree(searchstr); tfree(searchstr);
tfree(tok);
continue; continue;
} }
node1 = gettok(&curr_line); node1 = gettok(&curr_line);

Loading…
Cancel
Save