mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
log: Fix reporting OOM error incorrectly when defining a logging filter
When a new filter is being defined, the return code is not handled properly,
thus triggering OOM error reporting routine (bug introduced by 51b2606f
).
Signed-off-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
56258a388f
commit
b6daacf6ce
@ -335,11 +335,12 @@ virLogDefineFilter(const char *match,
|
||||
goto cleanup;
|
||||
|
||||
virLogFiltersSerial++;
|
||||
ret = virLogNbFilters - 1;
|
||||
cleanup:
|
||||
virLogUnlock();
|
||||
if (ret < 0)
|
||||
virReportOOMError();
|
||||
return virLogNbFilters;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user