[gimp] app: fix resource leak warnings caught by static analysis.
- From: Jacob Boerema <jboerema src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix resource leak warnings caught by static analysis.
- Date: Tue, 9 Nov 2021 03:41:55 +0000 (UTC)
commit 8d9db45dd57210405948fde578fa1f483e412b0b
Author: Jacob Boerema <jgboerema gmail com>
Date: Mon Nov 8 21:44:15 2021 -0500
app: fix resource leak warnings caught by static analysis.
In the unlikely case that we have an error we sometimes forget to free
either a dirname or appstring.
Let's fix these to reduce number of warnings.
app/file-data/file-data-gex.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/app/file-data/file-data-gex.c b/app/file-data/file-data-gex.c
index 799c2c00cc..5f8a75e55b 100644
--- a/app/file-data/file-data-gex.c
+++ b/app/file-data/file-data-gex.c
@@ -145,6 +145,7 @@ file_gex_validate_path (const gchar *path,
*error = g_error_new (GIMP_EXTENSION_ERROR, GIMP_EXTENSION_FAILED,
_("Absolute path are forbidden in GIMP extension '%s': %s"),
file_name, path);
+ g_free (dirname);
return FALSE;
}
@@ -263,6 +264,7 @@ file_gex_validate (GFile *file,
_("Fatal error when uncompressing GIMP extension
'%s': %s"),
gimp_file_get_utf8_name (file),
archive_error_string (a));
+ g_string_free (appstring, TRUE);
break;
}
else if (r == ARCHIVE_EOF)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]