mirror of
https://github.com/systemd/systemd
synced 2024-07-22 02:34:54 +00:00
initctl: use _cleanup_
This commit is contained in:
parent
70bbf65942
commit
0a956e8e02
|
@ -284,7 +284,7 @@ static int server_init(Server *s, unsigned n_sockets) {
|
||||||
|
|
||||||
static int process_event(Server *s, struct epoll_event *ev) {
|
static int process_event(Server *s, struct epoll_event *ev) {
|
||||||
int r;
|
int r;
|
||||||
Fifo *f;
|
_cleanup_(fifo_freep) Fifo *f = NULL;
|
||||||
|
|
||||||
assert(s);
|
assert(s);
|
||||||
assert(ev);
|
assert(ev);
|
||||||
|
@ -295,11 +295,10 @@ static int process_event(Server *s, struct epoll_event *ev) {
|
||||||
|
|
||||||
f = (Fifo*) ev->data.ptr;
|
f = (Fifo*) ev->data.ptr;
|
||||||
r = fifo_process(f);
|
r = fifo_process(f);
|
||||||
if (r < 0) {
|
if (r < 0)
|
||||||
log_info_errno(r, "Got error on fifo: %m");
|
return log_info_errno(r, "Got error on fifo: %m");
|
||||||
fifo_free(f);
|
|
||||||
return r;
|
TAKE_PTR(f);
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue