[gimp/gimp-2-10] CID 227971: Resource leak
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] CID 227971: Resource leak
- Date: Sat, 19 Oct 2019 21:53:37 +0000 (UTC)
commit 477c9458ab6a49af00a0c1a671c8294bf156a5da
Author: Sabri Ünal <libreajans gmail com>
Date: Sat Oct 19 21:53:25 2019 +0000
CID 227971: Resource leak
Leaked storage: Variable infile going out of scope leaks the storage it points to
Discovered by Coverity Scan.
plug-ins/common/file-mng.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/plug-ins/common/file-mng.c b/plug-ins/common/file-mng.c
index 9019cdcff8..14c10fedb4 100644
--- a/plug-ins/common/file-mng.c
+++ b/plug-ins/common/file-mng.c
@@ -1227,6 +1227,7 @@ mng_save_image (const gchar *filename,
{
g_warning ("Unable to mng_putchunk_ihdr() "
"in mng_save_image()");
+ fclose (infile);
goto err3;
}
}
@@ -1237,6 +1238,7 @@ mng_save_image (const gchar *filename,
{
g_warning ("Unable to mng_putchunk_idat() "
"in mng_save_image()");
+ fclose (infile);
goto err3;
}
}
@@ -1246,6 +1248,7 @@ mng_save_image (const gchar *filename,
{
g_warning ("Unable to mng_putchunk_iend() "
"in mng_save_image()");
+ fclose (infile);
goto err3;
}
}
@@ -1261,6 +1264,7 @@ mng_save_image (const gchar *filename,
{
g_warning ("Unable to mng_putchunk_plte() "
"in mng_save_image()");
+ fclose (infile);
goto err3;
}
}
@@ -1272,6 +1276,7 @@ mng_save_image (const gchar *filename,
{
g_warning ("Unable to mng_putchunk_trns() "
"in mng_save_image()");
+ fclose (infile);
goto err3;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]