d_source cfunc.mod: plug memory leaks

This commit is contained in:
h_vogt 2012-08-20 08:54:26 +02:00
parent 488bc6a8c8
commit 7191fdce63
1 changed files with 4 additions and 0 deletions

View File

@ -737,6 +737,8 @@ static int cm_read_source(FILE *source,char **all_bits,double *all_timepoints,
type = CNV_STRING_TOK;
while ( type != CNV_NO_TOK ) {
token = CNVget_token(&s, &type);
if (token)
free(token);
j++;
}
num_tokens = j;
@ -807,6 +809,8 @@ static int cm_read_source(FILE *source,char **all_bits,double *all_timepoints,
all_bits[i][j-1] = bit_value;
}
}
if (token)
free(token);
}
i++;
}