summaryrefslogtreecommitdiffstats
path: root/cmd-load-buffer.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2011-05-18 20:33:55 +0000
committerTiago Cunha <tcunha@gmx.com>2011-05-18 20:33:55 +0000
commit3cb428bc7e7da680dc0b18458812427f70f55677 (patch)
treedf63f9bd27f70cdd94d3ab8d8d2910c614893d67 /cmd-load-buffer.c
parente0fcd3b2472cb9062be9d8f53caefc3b73554ada (diff)
Sync OpenBSD patchset 912:
Use xfree not free, from Tiago Cunha.
Diffstat (limited to 'cmd-load-buffer.c')
-rw-r--r--cmd-load-buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd-load-buffer.c b/cmd-load-buffer.c
index 7984ff05..99e7ef48 100644
--- a/cmd-load-buffer.c
+++ b/cmd-load-buffer.c
@@ -1,4 +1,4 @@
-/* $Id: cmd-load-buffer.c,v 1.20 2011-01-07 14:45:34 tcunha Exp $ */
+/* $Id: cmd-load-buffer.c,v 1.21 2011-05-18 20:33:55 tcunha Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -154,7 +154,7 @@ cmd_load_buffer_callback(struct client *c, void *data)
psize = EVBUFFER_LENGTH(c->stdin_event->input);
if (psize == 0 || (pdata = malloc(psize + 1)) == NULL) {
- free(data);
+ xfree(data);
return;
}
bufferevent_read(c->stdin_event, pdata, psize);
@@ -170,5 +170,5 @@ cmd_load_buffer_callback(struct client *c, void *data)
bufferevent_enable(c->stderr_event, EV_WRITE);
}
- free (data);
+ xfree(data);
}