Menu

#14 output.c: memory leaks ?

v1.x
open
nobody
None
5
2016-02-13
2016-02-13
dcb
No

[output.c:1375]: (error) Memory leak: jvalclass
[output.c:1375]: (error) Memory leak: raw_type
[output.c:1214]: (error) Memory leak: raw_type

$ fgrep -n raw_type ../BUILD/byaccj1.15/src/output.c
1138: char raw_type=jsemantic_type;
1151: raw_type=(char
)CALLOC(end-jsemantic_type+1,sizeof(char));
1152: strncpy(raw_type,jsemantic_type,end-jsemantic_type);
1163: jsemantic_type,raw_type);
1191: fprintf(code_file," %s[] newstack = new %s[newsize];\n",jsemantic_type,raw_type);

$ fgrep -n jvalclass ../BUILD/byaccj1.15/src/output.c | fgrep -v fprintf
1128:char jvalclass; / either [Parser]Val or a user-defined class /
1133: jvalclass = (char
) MALLOC(strlen(jclass_name) + 4); / Val\0 /
1134: sprintf(jvalclass,"%sVal",jclass_name);
1221: jvalclass,jvalclass);
1223: sprintf(filenam,"%s.java",jvalclass);
$

Discussion


Log in to post a comment.