mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 19:02:25 +00:00
Revert "nwfilter: Move save of config until after successful assign"
This reverts commit b3e71a8830b2683ee88fa10cb048eabb99a446c0. As it turns out this ends up very badly as the @def could be Free'd even though it's owned by @obj as a result of the AssignDef.
This commit is contained in:
parent
3c3c3e3613
commit
dff020c91d
@ -524,14 +524,14 @@ virNWFilterObjListLoadConfig(virNWFilterObjListPtr nwfilters,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!(obj = virNWFilterObjListAssignDef(nwfilters, def)))
|
||||
goto error;
|
||||
|
||||
/* We generated a UUID, make it permanent by saving the config to disk */
|
||||
if (!def->uuid_specified &&
|
||||
virNWFilterSaveConfig(configDir, def) < 0)
|
||||
goto error;
|
||||
|
||||
if (!(obj = virNWFilterObjListAssignDef(nwfilters, def)))
|
||||
goto error;
|
||||
|
||||
VIR_FREE(configFile);
|
||||
return obj;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user