First argumnet in get_line
must be freeable
This fixes a potential c bug :p
This commit is contained in:
parent
397549386e
commit
5c06dbca6c
@ -57,7 +57,7 @@ void remove_line_from_file(int id_to_remove)
|
|||||||
int file_exists, line_count;
|
int file_exists, line_count;
|
||||||
FILE* csv;
|
FILE* csv;
|
||||||
FILE* new_csv;
|
FILE* new_csv;
|
||||||
char* line;
|
char* line = NULL;
|
||||||
size_t line_size = MAX_BUFFER_SIZE;
|
size_t line_size = MAX_BUFFER_SIZE;
|
||||||
|
|
||||||
file_exists = access(FILE_NAME, F_OK);
|
file_exists = access(FILE_NAME, F_OK);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user