aboutsummaryrefslogtreecommitdiff
path: root/src/Gif.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-05-16 11:22:17 +0200
committerdec05eba <dec05eba@protonmail.com>2018-05-16 11:22:20 +0200
commite1dbec0b78671a4e90e578a2ab67b7b114d3b57b (patch)
tree4b408c317037259440168af04706815c3e4be61b /src/Gif.cpp
parente6331c04af99d7deeb9b15be02dd30665c3c41ce (diff)
Fix memory leak reported by valgrind
Diffstat (limited to 'src/Gif.cpp')
-rw-r--r--src/Gif.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Gif.cpp b/src/Gif.cpp
index 69c0be8..afd5b9d 100644
--- a/src/Gif.cpp
+++ b/src/Gif.cpp
@@ -73,7 +73,7 @@ namespace dchat
}
catch(GifLoadException &e)
{
- delete fileContent.data;
+ delete[] fileContent.data;
throw e;
}
}
@@ -89,7 +89,7 @@ namespace dchat
}
catch(GifLoadException &e)
{
- delete fileContent.data;
+ delete[] fileContent.data;
throw e;
}
}
@@ -131,7 +131,7 @@ namespace dchat
Gif::~Gif()
{
gif_finalise(&gif);
- delete fileContent.data;
+ delete[] fileContent.data;
}
sf::Vector2u Gif::getSize() const