mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 10:25:37 +00:00
Don't leak in the (rare) case of an invalid command at the end of a file not
terminated by a \n.
This commit is contained in:
parent
05f1680efa
commit
b3107d26df
1 changed files with 2 additions and 0 deletions
2
cfg.c
2
cfg.c
|
|
@ -112,6 +112,8 @@ load_cfg(const char *path, char **cause)
|
|||
return (0);
|
||||
|
||||
error:
|
||||
if (line != NULL)
|
||||
xfree(line);
|
||||
fclose(f);
|
||||
|
||||
xasprintf(&ptr, "%s: %s at line %u", path, *cause, n);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue