From: Toni Wilen Date: Sun, 14 Feb 2016 16:36:04 +0000 (+0200) Subject: Prevent double-free. X-Git-Tag: 3300~79 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=b81b6ec4bfb1181bdfb3bea3b4fbd9018c75054d;p=francis%2Fwinuae.git Prevent double-free. --- diff --git a/hardfile.cpp b/hardfile.cpp index a8a07ce5..d87d3b36 100644 --- a/hardfile.cpp +++ b/hardfile.cpp @@ -2074,6 +2074,7 @@ static uae_u32 REGPARAM2 hardfile_close (TrapContext *ctx) if (!hfpd) return 0; scsi_free(hfpd->sd); + hfpd->sd = NULL; trap_put_word(ctx, hfpd->base + 32, trap_get_word(ctx, hfpd->base + 32) - 1); if (trap_get_word(ctx, hfpd->base + 32) == 0) { write_comm_pipe_pvoid(&hfpd->requests, NULL, 0);