1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Fix a possible double-free in libdevmapper-event.

This commit is contained in:
Petr Rockai 2007-11-27 12:26:06 +00:00
parent 940d710ece
commit cd1a7e80c0
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.23 -
==================================
Fix possible double-free in libdevmapper-event.
Define DM_READ_AHEAD_* values and flags.
Fix configure --with-dmeventd-path substitution.
Allow $DM_DEV_DIR envvar to override default of "/dev".

View File

@ -722,10 +722,15 @@ int dm_event_get_registered_device(struct dm_event_handler *dmevh, int next)
dm_event_handler_set_dso(dmevh, reply_dso);
dm_event_handler_set_event_mask(dmevh, reply_mask);
if (reply_dso)
if (reply_dso) {
dm_free(reply_dso);
if (reply_uuid)
reply_dso = NULL;
}
if (reply_uuid) {
dm_free(reply_uuid);
reply_uuid = NULL;
}
dmevh->dev_name = dm_strdup(dm_task_get_name(dmt));
if (!dmevh->dev_name) {