mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-11 21:58:48 +03:00
Skip zero length messages
In case of zero length message, there would be a memory leak on return path from _do_process_request.
This commit is contained in:
parent
526655301e
commit
59c71b93ad
@ -1504,9 +1504,10 @@ static void _process_initial_registrations(void)
|
||||
|
||||
while ((reg = _initial_registrations[i])) {
|
||||
msg.cmd = DM_EVENT_CMD_REGISTER_FOR_EVENT;
|
||||
msg.size = strlen(reg);
|
||||
msg.data = reg;
|
||||
_do_process_request(&msg);
|
||||
if ((msg.size = strlen(reg))) {
|
||||
msg.data = reg;
|
||||
_do_process_request(&msg);
|
||||
}
|
||||
++ i;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user