summaryrefslogtreecommitdiff
path: root/fluid
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2024-11-19 23:27:03 +0100
committerMatthias Melcher <github@matthiasm.com>2024-11-19 23:27:03 +0100
commit6df2219aa0e56d9632824c94a3b217ec015aa22f (patch)
tree2fe39f349f6a8bc80e416c88437cf51b371665d2 /fluid
parentc6d480352b24e9cbfaf6bd46d0a8d28b5475b7e0 (diff)
FLUID: fixing autodocs file leak and memory leak
Diffstat (limited to 'fluid')
-rw-r--r--fluid/autodoc.cxx1
-rw-r--r--fluid/fluid.cxx2
2 files changed, 3 insertions, 0 deletions
diff --git a/fluid/autodoc.cxx b/fluid/autodoc.cxx
index 0f2ea8e4a..35e1a73bd 100644
--- a/fluid/autodoc.cxx
+++ b/fluid/autodoc.cxx
@@ -104,6 +104,7 @@ static int convert_RGB_to_RGBA(Fl_RGB_Image *&img) {
delete img;
// Create the new image
img = new Fl_RGB_Image(data, img_w, img_h, 4);
+ delete[] data;
return 0;
}
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index 44814574e..a986c4c51 100644
--- a/fluid/fluid.cxx
+++ b/fluid/fluid.cxx
@@ -2302,6 +2302,8 @@ int main(int argc,char **argv) {
// check if the user wants FLUID to generate image for the user documentation
if (!g_autodoc_path.empty()) {
run_autodoc(g_autodoc_path);
+ set_modflag(0, 0);
+ exit_cb(0,0);
return 0;
}
#endif