free line on error in loop
This commit is contained in:
parent
b5e4de3f82
commit
21448cee37
@ -46,6 +46,9 @@ void loop() {
|
|||||||
else {
|
else {
|
||||||
perror("Error: ");
|
perror("Error: ");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
if (line != NULL) {
|
||||||
|
free(line);
|
||||||
|
}
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user