diff --git a/graf2d/asimage/src/TASImage.cxx b/graf2d/asimage/src/TASImage.cxx
index 22ffd50747a42e74c6e315ae42aae977c38b7ddb..9791e420c9dbf9170861c614cc8d08fdf580f6b5 100644
--- a/graf2d/asimage/src/TASImage.cxx
+++ b/graf2d/asimage/src/TASImage.cxx
@@ -2789,6 +2789,7 @@ Double_t *TASImage::Vectorize(UInt_t max_colors, UInt_t dither, Int_t opaque_thr
    fPalette = *pal;
    fImage->alt.vector = vec;
    UnZoom();
+   if (res) delete res;
    return (Double_t*)fImage->alt.vector;
 }