revert to use of g_free to make future qemu integrations easier (#695)

* revert to use of g_free to make future qemu integrations easier

* bracing
This commit is contained in:
Chris Eagle
2016-12-21 06:28:36 -08:00
committed by Nguyen Anh Quynh
parent 6a2eb14ff3
commit fccbcfd4c2
48 changed files with 224 additions and 219 deletions

View File

@@ -100,7 +100,7 @@ static int cpu_sparc_register(struct uc_struct *uc, SPARCCPU *cpu, const char *c
Error *err = NULL;
if (cpu_sparc_find_by_name(def, name) < 0) {
free(s);
g_free(s);
return -1;
}
@@ -109,7 +109,7 @@ static int cpu_sparc_register(struct uc_struct *uc, SPARCCPU *cpu, const char *c
featurestr = strtok(NULL, ",");
cc->parse_features(CPU(cpu), featurestr, &err);
free(s);
g_free(s);
if (err) {
//error_report("%s", error_get_pretty(err));
error_free(err);
@@ -821,7 +821,7 @@ static void sparc_cpu_uninitfn(struct uc_struct *uc, Object *obj, void *opaque)
SPARCCPU *cpu = SPARC_CPU(uc, obj);
CPUSPARCState *env = &cpu->env;
free(env->def);
g_free(env->def);
}
static void sparc_cpu_class_init(struct uc_struct *uc, ObjectClass *oc, void *data)

View File

@@ -34,30 +34,30 @@ void sparc_release(void *ctx)
int i;
TCGContext *tcg_ctx = (TCGContext *) ctx;
release_common(ctx);
free(tcg_ctx->cpu_wim);
free(tcg_ctx->cpu_cond);
free(tcg_ctx->cpu_cc_src);
free(tcg_ctx->cpu_cc_src2);
free(tcg_ctx->cpu_cc_dst);
free(tcg_ctx->cpu_fsr);
free(tcg_ctx->sparc_cpu_pc);
free(tcg_ctx->cpu_npc);
free(tcg_ctx->cpu_y);
free(tcg_ctx->cpu_tbr);
g_free(tcg_ctx->cpu_wim);
g_free(tcg_ctx->cpu_cond);
g_free(tcg_ctx->cpu_cc_src);
g_free(tcg_ctx->cpu_cc_src2);
g_free(tcg_ctx->cpu_cc_dst);
g_free(tcg_ctx->cpu_fsr);
g_free(tcg_ctx->sparc_cpu_pc);
g_free(tcg_ctx->cpu_npc);
g_free(tcg_ctx->cpu_y);
g_free(tcg_ctx->cpu_tbr);
for (i = 0; i < 8; i++) {
free(tcg_ctx->cpu_gregs[i]);
g_free(tcg_ctx->cpu_gregs[i]);
}
for (i = 0; i < 32; i++) {
free(tcg_ctx->cpu_gpr[i]);
g_free(tcg_ctx->cpu_gpr[i]);
}
free(tcg_ctx->cpu_PC);
free(tcg_ctx->btarget);
free(tcg_ctx->bcond);
free(tcg_ctx->cpu_dspctrl);
g_free(tcg_ctx->cpu_PC);
g_free(tcg_ctx->btarget);
g_free(tcg_ctx->bcond);
g_free(tcg_ctx->cpu_dspctrl);
free(tcg_ctx->tb_ctx.tbs);
g_free(tcg_ctx->tb_ctx.tbs);
}
void sparc_reg_reset(struct uc_struct *uc)