mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
libdevmapper-event: fix fifo leak on error path
Coverity: when _init_client() fails, client fifo could have been already openned and needs to be closed on error path.
This commit is contained in:
parent
459b3db61e
commit
8b857bfdc6
@ -1,5 +1,6 @@
|
||||
Version 1.02.111 -
|
||||
====================================
|
||||
Add missing fifo close when failed to initialize client connection.
|
||||
|
||||
Version 1.02.110 - 30th October 2015
|
||||
====================================
|
||||
|
@ -587,8 +587,8 @@ static int _do_event(int cmd, char *dmeventd_path, struct dm_event_daemon_messag
|
||||
};
|
||||
|
||||
if (!_init_client(dmeventd_path, &fifos)) {
|
||||
stack;
|
||||
return -ESRCH;
|
||||
ret = -ESRCH;
|
||||
goto_out;
|
||||
}
|
||||
|
||||
ret = daemon_talk(&fifos, msg, DM_EVENT_CMD_HELLO, NULL, NULL, 0, 0);
|
||||
@ -598,7 +598,7 @@ static int _do_event(int cmd, char *dmeventd_path, struct dm_event_daemon_messag
|
||||
|
||||
if (!ret)
|
||||
ret = daemon_talk(&fifos, msg, cmd, dso_name, dev_name, evmask, timeout);
|
||||
|
||||
out:
|
||||
/* what is the opposite of init? */
|
||||
fini_fifos(&fifos);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user