diff options
author | Thomas Adam <thomas@xteddy.org> | 2018-01-17 11:26:10 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2018-01-17 11:26:10 +0000 |
commit | 84ddc72744d88f399103ea350c28d5fb45e28b96 (patch) | |
tree | 76a62ad185f8a274f4243a2365fd01801e421b8e /cmd-load-buffer.c | |
parent | 58e9d12f23be4ecc7ab6879e8d19239b430f6553 (diff) | |
parent | 75842bfe66d983580dddf11b676445d5b9fa9f8a (diff) | |
download | rtmux-84ddc72744d88f399103ea350c28d5fb45e28b96.tar.gz rtmux-84ddc72744d88f399103ea350c28d5fb45e28b96.tar.bz2 rtmux-84ddc72744d88f399103ea350c28d5fb45e28b96.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-load-buffer.c')
-rw-r--r-- | cmd-load-buffer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-load-buffer.c b/cmd-load-buffer.c index a3cabdc0..74f97d1d 100644 --- a/cmd-load-buffer.c +++ b/cmd-load-buffer.c @@ -59,7 +59,8 @@ cmd_load_buffer_exec(struct cmd *self, struct cmdq_item *item) struct client *c = item->client; FILE *f; const char *path, *bufname; - char *pdata, *new_pdata, *cause, *file; + char *pdata = NULL, *new_pdata, *cause; + char *file; size_t psize; int ch, error; @@ -89,8 +90,7 @@ cmd_load_buffer_exec(struct cmd *self, struct cmdq_item *item) f = fopen(file, "rb"); if (f == NULL) { cmdq_error(item, "%s: %s", file, strerror(errno)); - free(file); - return (CMD_RETURN_ERROR); + goto error; } pdata = NULL; |