#define PAKFIRE_LEGACY_LOGGING
#include <pakfire/constants.h>
+#include <pakfire/ctx.h>
#include <pakfire/dependencies.h>
#include <pakfire/i18n.h>
#include <pakfire/logging.h>
#include <pakfire/util.h>
struct pakfire_problem {
+ struct pakfire_ctx* ctx;
struct pakfire* pakfire;
int nrefs;
if (!p)
return 1;
+ p->ctx = pakfire_ctx(pakfire);
p->pakfire = pakfire_ref(pakfire);
p->nrefs = 1;
pakfire_transaction_unref(problem->transaction);
if (problem->string)
free(problem->string);
- pakfire_unref(problem->pakfire);
+ if (problem->pakfire)
+ pakfire_unref(problem->pakfire);
+ if (problem->ctx)
+ pakfire_ctx_unref(problem->ctx);
free(problem);
}