Merge "fc_sort: Fix leaks" am: 7f4b2ad584
am: acbf2ad328
Change-Id: Ic59386f9a2a02438299ee11f3b36fdd7b9b34c99
This commit is contained in:
commit
274c4e3352
@ -350,6 +350,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* Parse the file into a file_context linked list. */
|
||||
line_buf = NULL;
|
||||
buf_len = 0;
|
||||
|
||||
while ( getline(&line_buf, &buf_len, in_file) != -1 ){
|
||||
line_len = strlen(line_buf);
|
||||
@ -478,15 +479,13 @@ int main(int argc, char *argv[])
|
||||
current->next = temp;
|
||||
current = current->next;
|
||||
lines++;
|
||||
|
||||
|
||||
free(line_buf);
|
||||
line_buf = NULL;
|
||||
}
|
||||
free(line_buf);
|
||||
fclose(in_file);
|
||||
|
||||
/* Create the bucket linked list from the earlier linked list. */
|
||||
current = head->next;
|
||||
free(head);
|
||||
bcurrent = master =
|
||||
(file_context_bucket_t *)
|
||||
malloc(sizeof(file_context_bucket_t));
|
||||
|
Loading…
Reference in New Issue
Block a user