mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 07:42:56 +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;
|
goto cleanup;
|
||||||
|
|
||||||
virLogFiltersSerial++;
|
virLogFiltersSerial++;
|
||||||
|
ret = virLogNbFilters - 1;
|
||||||
cleanup:
|
cleanup:
|
||||||
virLogUnlock();
|
virLogUnlock();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
return virLogNbFilters;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user