Skip to content
Snippets Groups Projects
Commit d167e9f6 authored by Danilo Piparo's avatar Danilo Piparo
Browse files

[Graphics][ROOT-7647] Properly delete the return of `colormap_asimage`

parent 033cbd37
No related branches found
No related tags found
No related merge requests found
...@@ -2900,7 +2900,8 @@ Double_t *TASImage::Vectorize(UInt_t max_colors, UInt_t dither, Int_t opaque_thr ...@@ -2900,7 +2900,8 @@ Double_t *TASImage::Vectorize(UInt_t max_colors, UInt_t dither, Int_t opaque_thr
fPalette = *pal; fPalette = *pal;
fImage->alt.vector = vec; fImage->alt.vector = vec;
UnZoom(); UnZoom();
if (res) delete res; // ROOT-7647: res is allocated with `safemalloc` by colormap_asimage
if (res) safefree(res);
return (Double_t*)fImage->alt.vector; return (Double_t*)fImage->alt.vector;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment