conf: auto free run_buffer

parent 7fda348e
...@@ -306,8 +306,8 @@ static struct limit_opt limit_opt[] = { ...@@ -306,8 +306,8 @@ static struct limit_opt limit_opt[] = {
static int run_buffer(char *buffer) static int run_buffer(char *buffer)
{ {
__do_free char *output = NULL;
int ret; int ret;
char *output;
struct lxc_popen_FILE *f; struct lxc_popen_FILE *f;
f = lxc_popen(buffer); f = lxc_popen(buffer);
...@@ -326,8 +326,6 @@ static int run_buffer(char *buffer) ...@@ -326,8 +326,6 @@ static int run_buffer(char *buffer)
while (fgets(output, LXC_LOG_BUFFER_SIZE, f->f)) while (fgets(output, LXC_LOG_BUFFER_SIZE, f->f))
DEBUG("Script %s with output: %s", buffer, output); DEBUG("Script %s with output: %s", buffer, output);
free(output);
ret = lxc_pclose(f); ret = lxc_pclose(f);
if (ret == -1) { if (ret == -1) {
SYSERROR("Script exited with error"); SYSERROR("Script exited with error");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment