mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +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 nwfilterLog(msg...) fprintf(stderr, msg)
|
||||
|
||||
|
||||
static virNWFilterDriverStatePtr driverState;
|
||||
|
||||
static int nwfilterDriverShutdown(void);
|
||||
@ -95,7 +92,6 @@ nwfilterDriverStartup(int privileged) {
|
||||
goto error;
|
||||
|
||||
if (virAsprintf(&base, "%s/.libvirt", userdir) == -1) {
|
||||
nwfilterLog("out of memory in virAsprintf");
|
||||
VIR_FREE(userdir);
|
||||
goto out_of_memory;
|
||||
}
|
||||
@ -118,7 +114,7 @@ nwfilterDriverStartup(int privileged) {
|
||||
return 0;
|
||||
|
||||
out_of_memory:
|
||||
nwfilterLog("virNWFilterStartup: out of memory");
|
||||
virReportOOMError();
|
||||
|
||||
error:
|
||||
VIR_FREE(base);
|
||||
|
Loading…
Reference in New Issue
Block a user