mirror of
https://github.com/tmate-io/tmate.git
synced 2025-04-30 22:24:27 +02:00
Use xfree not free, from Tiago Cunha.
This commit is contained in:
parent
fb527c1bad
commit
f702dbfea2
@ -154,7 +154,7 @@ cmd_load_buffer_callback(struct client *c, void *data)
|
|||||||
|
|
||||||
psize = EVBUFFER_LENGTH(c->stdin_event->input);
|
psize = EVBUFFER_LENGTH(c->stdin_event->input);
|
||||||
if (psize == 0 || (pdata = malloc(psize + 1)) == NULL) {
|
if (psize == 0 || (pdata = malloc(psize + 1)) == NULL) {
|
||||||
free(data);
|
xfree(data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bufferevent_read(c->stdin_event, pdata, psize);
|
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);
|
bufferevent_enable(c->stderr_event, EV_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
free (data);
|
xfree(data);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user