fix a segfault, incorrect invocation of free()

This commit is contained in:
rlar 2011-06-02 11:02:52 +00:00
parent f9a5d631ae
commit 545e9004e9
2 changed files with 9 additions and 4 deletions

View File

@ -1,9 +1,14 @@
2011-06-02 Robert Larice
* src/frontend/evaluate.c :
fix a segfault, incorrect invocation of free()
seen with expressions like v(node)[0]
2011-06-02 Holger Vogt
* tests/hisim/makefile.am: no more test1.cir in EXTRA_DIST
* INSTALL, compile_min.sh: new instructions for mingw compilation
2011-06-01 Dietmar Warning
* devices/bjt/bjt.c: introduce ccc as an alias for the
* devices/bjt/bjt.c: introduce ccs as an alias for the
zero bias substrate junction capacitance cjs
2011-06-01 Robert Larice

View File

@ -658,7 +658,7 @@ op_range(struct pnode *arg1, struct pnode *arg2)
/* va: garbage collection */
if (arg1->pn_value==NULL && v!=NULL) vec_free(v);
if (arg1->pn_value==NULL && ind!=NULL) vec_free(ind);
if (arg2->pn_value==NULL && ind!=NULL) vec_free(ind);
return (res);
}
@ -811,7 +811,7 @@ op_ind(struct pnode *arg1, struct pnode *arg2)
/* va: garbage collection */
if (arg1->pn_value==NULL && v!=NULL) vec_free(v);
if (arg1->pn_value==NULL && ind!=NULL) vec_free(ind);
if (arg2->pn_value==NULL && ind!=NULL) vec_free(ind);
return (res);
}