1
0
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:
Zdenek Kabelac 2012-03-01 22:54:17 +00:00
parent 526655301e
commit 59c71b93ad

View File

@ -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;
}
}