From b81b6ec4bfb1181bdfb3bea3b4fbd9018c75054d Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 14 Feb 2016 18:36:04 +0200 Subject: [PATCH] Prevent double-free. --- hardfile.cpp | 1 + 1 file changed, 1 insertion(+) 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); -- 2.47.3