Skip to content

Commit

Permalink
defer destroy magickwand
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Berhent committed Aug 29, 2022
1 parent 823ee6d commit b78aba3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/magickwand/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type ImageFormat string

func ConvertSvgToBinary(svgData []byte, format ImageFormat, size uint) ([]byte, error) {
mw := imagick.NewMagickWand()
defer mw.Destroy()
mw.SetImageFormat("SVG")
pixelWand := imagick.NewPixelWand()
pixelWand.SetColor("none")
Expand Down

0 comments on commit b78aba3

Please sign in to comment.