mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +00:00
nwfilter: use consistent OOM reporting
* src/nwfilter/nwfilter_driver.c (nwfilterLog): Delete. (nwfilterDriverStartup): Use virReportOOMError instead.
This commit is contained in:
parent
9ba934c640
commit
52baf647ca
@ -42,9 +42,6 @@
|
|||||||
|
|
||||||
#define VIR_FROM_THIS VIR_FROM_NWFILTER
|
#define VIR_FROM_THIS VIR_FROM_NWFILTER
|
||||||
|
|
||||||
#define nwfilterLog(msg...) fprintf(stderr, msg)
|
|
||||||
|
|
||||||
|
|
||||||
static virNWFilterDriverStatePtr driverState;
|
static virNWFilterDriverStatePtr driverState;
|
||||||
|
|
||||||
static int nwfilterDriverShutdown(void);
|
static int nwfilterDriverShutdown(void);
|
||||||
@ -95,7 +92,6 @@ nwfilterDriverStartup(int privileged) {
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (virAsprintf(&base, "%s/.libvirt", userdir) == -1) {
|
if (virAsprintf(&base, "%s/.libvirt", userdir) == -1) {
|
||||||
nwfilterLog("out of memory in virAsprintf");
|
|
||||||
VIR_FREE(userdir);
|
VIR_FREE(userdir);
|
||||||
goto out_of_memory;
|
goto out_of_memory;
|
||||||
}
|
}
|
||||||
@ -118,7 +114,7 @@ nwfilterDriverStartup(int privileged) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out_of_memory:
|
out_of_memory:
|
||||||
nwfilterLog("virNWFilterStartup: out of memory");
|
virReportOOMError();
|
||||||
|
|
||||||
error:
|
error:
|
||||||
VIR_FREE(base);
|
VIR_FREE(base);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user