SDL_image: Fixed double free in webp decode failure path

From 83ccd1432f3e707be54372e22c2afb69dfc3944f Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 21 Aug 2026 07:57:35 -0700
Subject: [PATCH] Fixed double free in webp decode failure path

Fixes https://github.com/libsdl-org/SDL_image/issues/755
---
 src/IMG_webp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/IMG_webp.c b/src/IMG_webp.c
index 5e3332408..689ce9abd 100644
--- a/src/IMG_webp.c
+++ b/src/IMG_webp.c
@@ -668,7 +668,6 @@ bool IMG_CreateWEBPAnimationDecoder(IMG_AnimationDecoder *decoder, SDL_Propertie
 
     decoder->ctx->canvas = SDL_CreateSurface(width, height, has_alpha ? SDL_PIXELFORMAT_RGBA32 : SDL_PIXELFORMAT_RGBX32);
     if (!decoder->ctx->canvas) {
-        lib.WebPDemuxDelete(decoder->ctx->demuxer);
         IMG_AnimationDecoderClose_Internal(decoder);
         return false;
     }