diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-07-09 09:54:56 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-07-09 09:54:56 +0000 |
commit | 29f9d5f3352175fcbfab36da18beb29490f13ae8 (patch) | |
tree | 9b5b004257c677a32708e9d9937d6543f0a6f390 | |
parent | 86c93c6e34cfe927e8d4e2901febf2ee063fa88b (diff) | |
download | rtmux-29f9d5f3352175fcbfab36da18beb29490f13ae8.tar.gz rtmux-29f9d5f3352175fcbfab36da18beb29490f13ae8.tar.bz2 rtmux-29f9d5f3352175fcbfab36da18beb29490f13ae8.zip |
Don't leak FILE * on malloc failure. From ivoire at users dot sourceforge dot net.
-rw-r--r-- | cmd-load-buffer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd-load-buffer.c b/cmd-load-buffer.c index 23adfec2..11d2d548 100644 --- a/cmd-load-buffer.c +++ b/cmd-load-buffer.c @@ -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); } |