mirror of
https://github.com/tmate-io/tmate.git
synced 2026-07-28 13:23:50 +00:00
Don't leak FILE * on malloc failure. From ivoire at users dot sourceforge dot net.
This commit is contained in:
parent
86c93c6e34
commit
29f9d5f335
1 changed files with 1 additions and 0 deletions
|
|
@ -78,6 +78,7 @@ cmd_load_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
|
|||
*/
|
||||
if ((buf = malloc(statbuf.st_size + 1)) == NULL) {
|
||||
ctx->error(ctx, "malloc error: %s", strerror(errno));
|
||||
fclose(f);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue