* src/util/virtaudit.c: Free audit string
* src/vbox/vbox_XPCOMCGlue.c: Free library name
#include "virtaudit.h"
#include "util.h"
#include "files.h"
+#include "memory.h"
/* Provide the macros in case the header file is old.
FIXME: should be removed. */
}
#if HAVE_AUDIT
- if (auditfd < 0)
+ if (auditfd < 0) {
+ VIR_FREE(str);
return;
+ }
if (str) {
static const int record_types[] = {
VIR_WARN("Failed to send audit message %s: %s",
NULLSTR(str), virStrerror(errno, ebuf, sizeof ebuf));
}
+ VIR_FREE(str);
}
#endif
}
VIR_ERROR(_("Libaray '%s' doesn't exist"), name);
}
+ VIR_FREE(name);
return -1;
}
} else {